Sign in to follow this  
Followers 0
Guest FantomBlu

Super Noob Needs Help Looping

7 posts in this topic

Hey all..I'm new to auto-it.and and using it for a vid game..I have the text I want to use..I just can't figure out how to loop it over and over again..and if possible..is there a way to stop the macro in the form of a hotkey?? Thx for the help :D

MouseClick("left", 411, 390, 2)

MouseClick("left", 411, 390, 2)

Sleep(1000)

MouseClick("left", 411, 390, 2)

MouseClick("left", 411, 390, 2)

Sleep(1000)

MouseClick("left", 411, 390, 2)

MouseClick("left", 411, 390, 2)

Sleep(1000)

MouseClick("left", 411, 390, 2)

MouseClick("left", 411, 390, 2)

Sleep(1000)

MouseClick("left", 443, 390, 2)

MouseClick("left", 443, 390, 2)

Sleep(5000)

Share this post


Link to post
Share on other sites



Haven't I seen this question asked before in almost exactly the same words? For the hotkey, see FAQ #12 in the help file. For the infinite loop, see While in the help file.

Share this post


Link to post
Share on other sites

Ok..i got the script perfect..but still can't get the hotkey to pause the script or the looping working...could someone copy and add the commands I need?

Pause = alt-p ....would be great :D

and any kind of auto loop command would be even better...

MouseClick("left", 590, 50)

Sleep(2500)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep (1000)

MouseClick("left", 443, 390)

MouseClick("left", 443, 390)

Sleep(5000)

MouseClick("left", 619, 50)

Sleep(2500)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(1000)

MouseClick("left", 443, 390)

MouseClick("left", 443, 390)

Sleep(5000)

MouseClick("left", 653, 50)

Sleep(2500)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(1000)

MouseClick("left", 443, 390,)

MouseClick("left", 443, 390)

Sleep(5000)

MouseClick("left", 687, 50)

Sleep(2500)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(1000)

MouseClick("left", 443, 390)

MouseClick("left", 443, 390)

Sleep(5000)

MouseClick("left", 750, 50)

Sleep(2500)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(1000)

MouseClick("left", 443, 390)

MouseClick("left", 443, 390)

Sleep(5000)

MouseClick("left", 784, 50)

Sleep(2500)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(1000)

MouseClick("left", 443, 390)

MouseClick("left", 443, 390)

Sleep(5000)

MouseClick("left", 817, 50)

Sleep(2500)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(1000)

MouseClick("left", 443, 390)

MouseClick("left", 443, 390)

Sleep(5000)

MouseClick("left", 852, 50)

Sleep(2500)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(2000)

MouseClick("left", 411, 390)

MouseClick("left", 411, 390)

Sleep(1000)

MouseClick("left", 443, 390)

MouseClick("left", 443, 390)

Sleep(5000)

thx in advance

Share this post


Link to post
Share on other sites

Something like this?

Anyway, Valik is right... READ THE FUCKIN' MANUAL!!

Global $PAUSED

HotKeySet("!x", "_Terminate")
HotKeySet("!p", "_Pause")

While 1; < - This will let loop forever
   MouseClick("left", 411, 390, 2)
   MouseClick("left", 411, 390, 2)
   Sleep(1000)
   MouseClick("left", 411, 390, 2)
   MouseClick("left", 411, 390, 2)
   Sleep(1000)
   MouseClick("left", 411, 390, 2)
   MouseClick("left", 411, 390, 2)
   Sleep(1000)
   MouseClick("left", 411, 390, 2)
   MouseClick("left", 411, 390, 2)
   Sleep(1000)
   MouseClick("left", 443, 390, 2)
   MouseClick("left", 443, 390, 2)
   Sleep(5000)
Wend

Exit
Func _Terminate()
   Exit
EndFunc  ;==>_Terminate

Func _Pause()
   $PAUSED = Not $PAUSED
   While $PAUSED
      Sleep(100)
      ToolTip('Script is "Paused"', @DesktopWidth/2,0)
   Wend
   ToolTip("")
EndFunc  ;==>_Pause

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Something like this?

Anyway, Valik is right... READ THE FUCKIN' MANUAL!!

dude, they never learn if you give them the answer outright... at least look for some proof they've opened the helpfile... Edited by emmanuel

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

How?

Share this post


Link to post
Share on other sites

How?

like their actually having some attempt of making the hotkey function work, something like that... I guess. some sort of "I tried to make this work, this is what I tried" or "can this work, I looked and found something similar, but not what I wanted" something like that... I just find it funny to say RTFM! following giving them the script to do it... don't stress on it though, I'm sure not going to say "don't be helpful" since next time I ask for help, I wouldn't want you to think of that :D

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0