Jump to content

Drag and Drop onto compiled autoit .exe


corvias
 Share

Recommended Posts

Hi all,

I've searched the forums and the help files, but I can't seem to find info on how to get a compiled autoit script to perform actions on a file that has been dragged onto its icon. I've found plenty of examples of dragging files onto GUI windows and control, but non on autoit executables. Is this even possible? I appreciate any help to nudge me in the right direction. Thanks!

Link to comment
Share on other sites

Just use commandline parameter. Quick example

If $CmdLine[0] <> 0 Then MsgBox(4000, "Drag n Drop Demo", "Dropped file is " & $CmdLine[1])

The script must be compiled

Holy crap, why didn't I think of that? I was so focused on GUI stuff that I completely forgot about $CmdLine. Thank you, that is exactly what I needed.

Incidentally, Why isn't $CmdLine a macro? is it because it's an array?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...