Jump to content

Recommended Posts

Posted

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!

Posted

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?

Posted

Why macro? Most of the times we passed more than 1 parameter and the parameter is not a constant value

AUTOIT[sup] I'm lovin' it![/sup]

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
  • Recently Browsing   0 members

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