borlays Posted July 30, 2008 Posted July 30, 2008 Is my code right for moving mouse automatically and then press right click? HotKeySet("{=}", "_First") HotKeySet("{ESC}", "_Quit") Func _First() MouseClick("right",304,278,1,5) (Sleep 6500) MouseClick("right",304,278,1,5) (Sleep 6000) MouseClick("right",304,278,1,5) (Sleep 4000) MouseClick("right",304,278,1,5) EndFunc Func _Quit() Exit EndFunc
TerarinKerowyn Posted July 30, 2008 Posted July 30, 2008 (edited) It right clicks four times without moving so it you move it returns back to 304,278. It go pretty fast when doing it as it usually does it at 10 not 5 (1 being fast and it keeps slowing down) Ahhh, Also changing the (Sleep <number>) to the correct way Sleep(<number>) Edited July 30, 2008 by TerarinKerowyn Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah
Malkey Posted July 30, 2008 Posted July 30, 2008 Is my code right for moving mouse automatically and then press right click? HotKeySet("{=}", "_First") HotKeySet("{ESC}", "_Quit") Func _First() MouseClick("right",304,278,1,5) (Sleep 6500) MouseClick("right",304,278,1,5) (Sleep 6000) MouseClick("right",304,278,1,5) (Sleep 4000) MouseClick("right",304,278,1,5) EndFunc Func _Quit() Exit EndFunc Try this HotKeySet("{=}", "_First") HotKeySet("{ESC}", "_Quit") While 1 Sleep(10) WEnd Func _First() MouseClick("right", 304, 278, 1, 5) Sleep(6500) MouseClick("right", 304, 278, 1, 5) Sleep(6000) MouseClick("right", 304, 278, 1, 5) Sleep(4000) MouseClick("right", 304, 278, 1, 5) EndFunc ;==>_First Func _Quit() Exit EndFunc ;==>_Quit If your are wondering about the sleep inside the While-Wend loop, delete it and look at the CPU Usage in Windows Task Manager. CPU goes to 100% without the Sleep(). Without the loop your script would be run and finished in milliseconds.
borlays Posted July 30, 2008 Author Posted July 30, 2008 Another question about my script: MouseClick("right", 304, 278, 1, 5) what does 1, 5 means? speed of mouse? and also, how can my script run continuously.?
TerarinKerowyn Posted July 30, 2008 Posted July 30, 2008 Lookup the function MouseClick MouseClick ( "button" [, x, y [, clicks [, speed ]]] ) Also to run continously you'll need to put the Loop in there with a Sleep(100) 100 or 250 can be better if you want to use your PC while running that because it is .1 or .25 of a second. 10 is .01 of a second and must run through the loop 10 times else 25 times more Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah
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