0

Terminated for not being clear question? So as I have an answer?

Need Clicking the Left Mouse Button on a file in Windows Explorer, and you receive a message with the full file path.

Example: If I click the mouse on the file win.ini Displays the MsgBox: c:\windows\win.ini

OBS: Please, I need answers ready with examples, because my English is horrible and I am new to programming.

Vampirinha
  • 41
  • 1
  • 9

1 Answers1

5

You could use something like this:

^LButton::
    ; Select the file underneath the cursor
    Click
    ; Save whatever was in the clipboard
    t := Clipboard
    ; Copy the selected file
    Send, ^c
    ; Store the path
    path := Clipboard
    ; Restore the previous clipboard
    Clipboard := t
    ; Display the path
    msgBox % path
return

I've bound it to Ctrl+Left Mouse Button since binding it to the Left Mouse Button would trigger it all the time.

It should be noted though that you can do this in Windows already, just Shift+Right Click the file and select "Copy as path".

Sid
  • 1,709
  • 1
  • 10
  • 17
  • Yes! Exactly what I was looking for, you are a genius! I did not know that copying the file to the Clipboard also copied the full Path, and it helped me to create the script. yeahhhh – Vampirinha Oct 30 '14 at 17:03