MCT Posted December 6, 2005 Posted December 6, 2005 (edited) hey all, i wanna make a file that runs other files @ a specific time example if $cmdline[1] < 500 then $time = 1000 else $time = $cmdline[1] run($cmdline[2]) sleep($time) run($cmdline[3]) i can get it to work but if $cmdline[3] doesnt exist, i want it to just process cmdline 1 & 2 Edited December 6, 2005 by MCT
Nuffilein805 Posted December 6, 2005 Posted December 6, 2005 how do you get the $cmdline - array? your if is missing endif my little chatmy little encryption toolmy little hidermy unsafe clickbot
MHz Posted December 6, 2005 Posted December 6, 2005 (edited) how do you get the $cmdline - array?$cmdline[?] is a built in array for incoming parameters to the script. http://www.autoitscript.com/autoit3/docs/i...htm#CommandLine @MCT, This example If block of code may suit your needs ? If $cmdline[0] = 2 Then ; can use $cmdline[1] and $cmdline[2] here ElseIf $cmdline[0] = 3 Then ; can use $cmdline[1], $cmdline[2] and $cmdline[3] here EndIf $cmdline[0] Holds the count, so test the incoming parameter count against $cmdline[0] Edited December 6, 2005 by MHz
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