AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Loops

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
TommyEvans



Joined: 09 Mar 2010
Posts: 5

PostPosted: Tue Mar 09, 2010 5:40 am    Post subject: Loops Reply with quote

I'm wanting to loop a certain few commands every 60 seconds. How do I do this?

Code:
Click 438, 386
Click 733, 657


That's all I have right now. I just need it to loop every 60 seconds, and I'm set!
Back to top
View user's profile Send private message
Guest






PostPosted: Tue Mar 09, 2010 5:45 am    Post subject: Reply with quote

u can use settimer for 60000 ms
remember to add #Persistent
Back to top
toralf



Joined: 31 Jan 2005
Posts: 3910
Location: Bremen, Germany

PostPosted: Tue Mar 09, 2010 5:45 am    Post subject: Reply with quote

Please take a look at SetTimer
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Leef_me



Joined: 08 Apr 2009
Posts: 5336
Location: San Diego, California

PostPosted: Tue Mar 09, 2010 5:50 am    Post subject: Reply with quote

Might I suggest doing a little reading?

Tutorial for Newbies
http://www.autohotkey.com/forum/viewtopic.php?t=47791

regarding your request:

either use these together
http://www.autohotkey.com/docs/commands/Loop.htm
http://www.autohotkey.com/docs/commands/Sleep.htm

or this command
http://www.autohotkey.com/docs/commands/SetTimer.htm
Back to top
View user's profile Send private message
TommyEvans



Joined: 09 Mar 2010
Posts: 5

PostPosted: Tue Mar 09, 2010 5:51 am    Post subject: Reply with quote

I'm using now:
Code:
Click 438, 386
Click 733, 657
#Persistent
SetTimer, 200
return


Failure to work. >.> Note, 200 is only a test number. Not the actual number I'm using.
Back to top
View user's profile Send private message
answer4u
Guest





PostPosted: Tue Mar 09, 2010 6:14 am    Post subject: Reply with quote

Try this format:
Code:
#Persistent
sec = 60
SetTimer, label, % sec * 1000
Return

label:
... code you want repeated here ...
Return
Back to top
TommyEvans



Joined: 09 Mar 2010
Posts: 5

PostPosted: Tue Mar 09, 2010 7:00 am    Post subject: Reply with quote

That worked! Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group