Jump to content
Sign in to follow this  
corvias

Drag and Drop onto compiled autoit .exe

Recommended Posts

corvias

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!

Share this post


Link to post
Share on other sites
slayerz

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


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

Share this post


Link to post
Share on other sites
corvias

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?

Share this post


Link to post
Share on other sites
slayerz

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]

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.