Dlund Posted June 27, 2012 Posted June 27, 2012 Hey guys, I'm touching back with AutoIt after Multiple years; I have since learned Java, and seem to be doing okay-- until I wanted to optimize my code. Working sleep(Random(0,100,1)) $item[5]=IniRead(@ScriptDir & "\test.ini","Variables","brace",1) if $item[5]=1 Then MouseClick("secondary", 1720+Random(-15,15,1), 800+Random(-15,15,1)) Not working clickIt(5,1720,800,"brace",0); Func clickIt($n,$ix, $iy,$item, $alt) sleep(random(0, 200, 0)); $item[$n]=1 ;IniRead(@ScriptDir & "\test.ini","Variables",$item,0) if $alt=1 then send("{altdown}");switch true/false for secondary ring under first on far right if $item[$n]=1 Then MouseClick("secondary", $ix+Random(-15,15,1), $iy+Random(-15,15,1)) if $alt=1 then send("{altup}") endfunc It appears to be calling the clickIt function, but all ifs are being read as false; any suggestions for me? thank you in advance!
JohnOne Posted June 27, 2012 Posted June 27, 2012 $item parameter is being passed a string and used as an array. You should really be getting an array error. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Dlund Posted June 27, 2012 Author Posted June 27, 2012 wow--- I'm retarded... I looked at that, and had to double check my array as it seemed the improper placement for $item. Thank you, that did the trick! Cheers!
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