kript Posted October 25, 2007 Share Posted October 25, 2007 Hi im trying to make this script but it keeps giving me errors any help would be awsome. heres what i need it to do mouse click left 306,448 (sleep) 3000 mouse click left 306,448 (sleep) 3000 (sleep) 1200000 (20 mins i think?) mouse click left 306,448 (sleep) 3000 mouse click left 306,448 (sleep) 3000 (sleep) 1200000 and have an unlimited loop till i shut it off with a hotkey (shift) Link to comment Share on other sites More sharing options...
Nevin Posted October 25, 2007 Share Posted October 25, 2007 Someone asked something very similar yesterday, check it out.http://www.autoitscript.com/forum/index.php?showtopic=55780I tested my code, so I know it runs without error, but weaponx's might be more conventional. Either way, mine works Link to comment Share on other sites More sharing options...
kript Posted October 25, 2007 Author Share Posted October 25, 2007 ok well thanks for that heres what i came up with testing now... Opt("SendKeyDownDelay",10) Sleep(10000) While 1;infinite loop if _IsPressed("1B") Then;This checks to see if a key is pressed, 1B is the hex code for the ESC key ExitLoop; EndIf Sleep(3000) MouseClick("left", 306, 448 ) Sleep(3000) MouseClick("left", 306, 448 ) Sleep(1200000) WEnd Link to comment Share on other sites More sharing options...
DW1 Posted October 25, 2007 Share Posted October 25, 2007 why is there a sleep before the While loop? It looks like an unnecessary wait AutoIt3 Online Help Link to comment Share on other sites More sharing options...
ofLight Posted October 25, 2007 Share Posted October 25, 2007 Seems to me that meathod may not Catch the Escape kep presses every time , with all those sleeps. HotKeySet('{ESC}', '_Exit') Opt("SendKeyDownDelay",10) Sleep(10000) While 1;infinite loop Sleep(3000) MouseClick("left", 306, 448 ) Sleep(3000) MouseClick("left", 306, 448 ) Sleep(1200000) WEnd Func _Exit() Exit EndFunc There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly Link to comment Share on other sites More sharing options...
Nevin Posted October 25, 2007 Share Posted October 25, 2007 why is there a sleep before the While loop? It looks like an unnecessary waitIndeed, it is unecessary. That's something the last guy specifically wanted. Seems to me that meathod may not Catch the Escape kep presses every time , with all those sleeps. HotKeySet('{ESC}', '_Exit') Opt("SendKeyDownDelay",10) Sleep(10000) While 1;infinite loop Sleep(3000) MouseClick("left", 306, 448 ) Sleep(3000) MouseClick("left", 306, 448 ) Sleep(1200000) WEnd Func _Exit() Exit EndFunc Yeah, I would test it and make sure. The one I used for the other guy seemed to work fine, but he only had Sleep(100) in his script. I wasn't so much suggesting to just copy the script as look up each function, see what it does, and then make something from there. I'd tool around with it a bit and figure out what might work, but I'm at work right now 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