On22s Posted December 6, 2007 Posted December 6, 2007 yeah i read help files and all this and that, did 1-2-3 i got everything just about ready, all i want to do is repeat that maybe set a hotkey that's it expandcollapse popupMouseMove(470,471) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(471,516) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(488,474) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(480,516) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(483,466) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(481,517) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(479,514) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(482,469) Sleep(10000) MouseClick(1)
DjDeep00 Posted December 6, 2007 Posted December 6, 2007 @On22s....To repeat these actions...put them inside a function and create a loop. For hotkey....search the help file for hotkeyset...
SpookMeister Posted December 6, 2007 Posted December 6, 2007 (edited) Something like this: expandcollapse popupHotKeySet("{ESC}", "Terminate") HotKeySet("{F4}", "_DoIt") While 1 Sleep(10) ; keeps it from using 100% CPU WEnd Func _DoIt() MouseMove(470, 471) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(471, 516) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(488, 474) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(480, 516) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(483, 466) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(481, 517) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(479, 514) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(482, 469) Sleep(10000) MouseClick(1) EndFunc ;==>_DoIt Func Terminate() Exit EndFunc ;==>Terminate [Edit] typo Edited December 6, 2007 by SpookMeister [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]
herewasplato Posted December 6, 2007 Posted December 6, 2007 (edited) MouseClick(1) is not the proper syntax. Edit1: That line, written that way, does nothing. MouseClick("left") will click one time by default. If the "1" that you specified is the number of clicks, you cannot skip the parameters in front of the "number of clicks" parm. MouseClick("button", x, y, clicks, speed) You may be able to replace these lines of code: MouseMove(470,471) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") with Sleep(10000) MouseClick("left", 470, 471, 1, 100) enjoy AutoIt Edited December 6, 2007 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
On22s Posted December 6, 2007 Author Posted December 6, 2007 thanks :D how do i make it repeat forever like start it and then later on when i chose it stop it
SpookMeister Posted December 6, 2007 Posted December 6, 2007 thanks :D how do i make it repeat forever like start it and then later on when i chose it stop itLike this: expandcollapse popupHotKeySet("{ESC}", "Terminate") While 1 MouseMove(470, 471) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(471, 516) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(488, 474) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(480, 516) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(483, 466) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(481, 517) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(479, 514) Sleep(10000) MouseClick(1) MouseDown("left") MouseUp("left") MouseMove(482, 469) Sleep(10000) MouseClick(1) WEnd Func Terminate() Exit EndFunc ;==>Terminate You should really consider herewasplato's suggestion about using less code though [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]
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