corvias Posted April 26, 2010 Posted April 26, 2010 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!
slayerz Posted April 27, 2010 Posted April 27, 2010 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 gcue 1 AUTOIT[sup] I'm lovin' it![/sup]
corvias Posted April 27, 2010 Author Posted April 27, 2010 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?
slayerz Posted April 28, 2010 Posted April 28, 2010 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]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now