Guest KJake Posted February 1, 2004 Share Posted February 1, 2004 Is there a way to pass argument(s) to AutoIt? Link to comment Share on other sites More sharing options...
CyberSlug Posted February 1, 2004 Share Posted February 1, 2004 (edited) AutoIt accepts command-line arguments separated by spaces. (The length of the command line is limited by the Windows platform and may be as little as 256 and as large as 1024 characters.) You can create a shortcut to the script then edit its properties to include arguments. Here's an example: ; Put compiled version in the Send To menu ; and it copies selected file path(s) to clipboard If $CmdLine[0] > 0 Then $tmp = "" For $i = 1 to $CmdLine[0] $tmp = $tmp & $CmdLine[$i] & @CRLF Next ClipPut( StringTrimRight($tmp,2) ) EndIf The special array $CmdLine[0] contains the number of elements (command-line arguments), $CmdLine[1] would contain the first element, etc. Post back if you need more detail. Edited February 1, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
jpm Posted February 1, 2004 Share Posted February 1, 2004 Tab is also a separating character. But take care of the quote is submitted by Run(@programfilesdir & '\AutoIt3\Autoit3.exe /c anystatements') I face this problem. I don't completely rememebr but quoting was a problem to manage. 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