AutoHotkey Open a File in a Script Open a File through Windows Drag n' Drop


Example

This examples creates a new empty Gui sensible to Drag n' Drop event:

Gui, Dropper: New
Gui, Dropper: Font, s10 w700
Gui, Dropper: Add, Text, y80 vText1, Drag the files here
Gui, Dropper: Show, w200 h200 Center, Dropper

return

DropperGuiDropFiles:
DroppedFile:=A_GuiEvent

    FileRead, content, %DroppedFile%
    msgbox %content%    

return