After writing a few scripts that trigger when other files are dropped on top of them, they were working as expected. Now, dragging and dropping onto a .ahk file does nothing.
Just to make sure it wasn't me, I tried using the code from Example 6 here https://www.autohotkey.com/docs/commands/LoopFile.htm. When I drop a text file named test.txt on top of it, ... nothing. Dragging and dropping in general still works, and I can drop a script onto autohotkey.exe and it runs, but if I drop a file onto an .ahk ... nada.
- I added a MsgBox at the top of the script, just to see if it was executing at all ... nope.
- Other scripts running? Nope.
- Run as Administrator? Not normally, but tried both ways -- nope.
Code: Select all
MsgBox, FIRE ; <-- I added this to see if the script even fired.
Loop %0% ; For each file dropped onto the script (or passed as a parameter).
{
GivenPath := %A_Index% ; Retrieve the next command line parameter.
Loop %GivenPath%, 1
LongPath = %A_LoopFileLongPath%
MsgBox The case-corrected long path name of file`n%GivenPath%`nis:`n%LongPath%
}
ExitApp
Incidentally, running "autohotkey.exe ThatScriptAbove.ahk Test.txt" from the command line works just fine.