anib Posted July 30, 2009 Share Posted July 30, 2009 hello everyone drag file in exe (one file) is good if $cmdline[0] then $file = $cmdlineraw endif but how is method to capture for multiple drag files in exe split is difficult >_< structure mouse ? thank a lot. excuse me for languages Me frappe pas !! je débute dans le monde du code :)Un novice avertit en vaut dix sans ennuie ;)AuToiT-FR Link to comment Share on other sites More sharing options...
diferent Posted July 30, 2009 Share Posted July 30, 2009 Command Line Parameters The special array $CmdLine is initialized with the command line parameters passed in to your AutoIt script. Note the scriptname is not classed as a parameter; get this information with @ScriptName instead. A parameter that contains spaces must be surrounded by "double quotes". Compiled scripts accept command line parameters in the same way. $CmdLine[0] is number of parameters $CmdLine[1] is param 1 (after the script name) $CmdLine[2] is param 2 etc ... $CmdLine[$CmdLine[0]] is one way to get the last parameter... So if your script is run like this: AutoIt3.exe myscript.au3 param1 "this is another param" $CmdLine[0] equals... 2 $CmdLine[1] equals... param1 $CmdLine[2] equals... this is another param @ScriptName equals... myscript.au3 In addition to $CmdLine there is a variable called $CmdLineRaw that contains the entire command line unsplit, so for the above example: $CmdLineRaw equals... myscript.au3 param1 "this is another param" If the script was compiled it would have been run like this: myscript.exe param1 "this is another param" $CmdLineRaw equals... param1 "this is another param" Note that $CmdLineRaw just return the parameters. Note : only 63 parameters can be return by $CmdLine[...], but $CmdLineRaw will always returns the entire command line. From read me. Autoit neeeds a help file make in Autoit. Link to comment Share on other sites More sharing options...
anib Posted July 30, 2009 Author Share Posted July 30, 2009 (edited) yes, the above I agree diferent, but I read the help;) For example, drag multi file in exe return (cmdlineraw) == "c:\www\param\Example execute.bin" c:\www\param\Example.bat split array ? no difficult, especially when there are spaces >_< microsoft is discute to function DragQueryFile/DragAcceptFile(lib:shell32.dll) but i'm not specialiste message to WM_DROPFILES (0x0233) thank you even when. Edited July 31, 2009 by anib Me frappe pas !! je débute dans le monde du code :)Un novice avertit en vaut dix sans ennuie ;)AuToiT-FR Link to comment Share on other sites More sharing options...
anib Posted August 5, 2009 Author Share Posted August 5, 2009 (edited) yes I have followed above, but I was not expressing the claim: ( we will put that picture: o there is in the details we choose 2 items. leaving us out cmdlineraw "F:\AUTOIT_SCRIPT\WWW\Param\Example execute.bin" F:\AUTOIT_SCRIPT\WWW\Param\Example.bat [/ code] if not, I drop the selection of multiple file finally here would be a shame: § thanks a lot Edited August 5, 2009 by anib Me frappe pas !! je débute dans le monde du code :)Un novice avertit en vaut dix sans ennuie ;)AuToiT-FR Link to comment Share on other sites More sharing options...
trancexx Posted August 5, 2009 Share Posted August 5, 2009 Compile this and see if it helps: MsgBox(0, '', $cmdlineraw) For $i = 1 To $cmdline[0] If FileExists($cmdline[$i]) Then MsgBox(0, '', $cmdline[$i]) EndIf Next ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
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