crazedwombat Posted November 11, 2009 Share Posted November 11, 2009 (edited) Opt("TrayIconDebug",1) while 1 $walk = random(1, 100) tooltip($walk) sleep(1000) if $walk > 50 Then controlsend("ClassName=TMainForm.UnicodeClass","","","{F9}") elseif $walk < 50 Then controlsend("ClassName=TMainForm.UnicodeClass","","","{F10}") EndIf WEnd this is a snippet off of my functioning script, $walk IS being assigned a randomly generated number, but the if statement isn't working.. any ideas why this wouldn't work? the same controlsends work in all other cases with the rest of the script, just not in regards to the random string... Edited November 11, 2009 by crazedwombat Link to comment Share on other sites More sharing options...
Bert Posted November 11, 2009 Share Posted November 11, 2009 what happens if $walk = 50? You didn't account for that. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
crazedwombat Posted November 11, 2009 Author Share Posted November 11, 2009 (edited) sorry guys, now it does work, was some sort of bug.. i've been messing with it for like an hour and now after taking a break and no further changes it works.. must be something bugging with controlsend and window focus or something... again, sorry. btw ty for the point about the = 50.. even though it works without it i'm sure it would've frozen up or killed the script had it managed to hit 50... Edited November 11, 2009 by crazedwombat 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