AutoHotkey Community

It is currently May 27th, 2012, 4:42 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Loops
PostPosted: March 9th, 2010, 6:40 am 
Offline

Joined: March 9th, 2010, 6:38 am
Posts: 5
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2010, 6:45 am 
u can use settimer for 60000 ms
remember to add #Persistent


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2010, 6:45 am 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Please take a look at SetTimer

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2010, 6:50 am 
Offline

Joined: April 8th, 2009, 7:49 pm
Posts: 6073
Location: San Diego, California
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2010, 6:51 am 
Offline

Joined: March 9th, 2010, 6:38 am
Posts: 5
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2010, 7:14 am 
Try this format:
Code:
#Persistent
sec = 60
SetTimer, label, % sec * 1000
Return

label:
... code you want repeated here ...
Return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2010, 8:00 am 
Offline

Joined: March 9th, 2010, 6:38 am
Posts: 5
That worked! Thanks!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: 0x150||ISO, rbrtryn, Yahoo [Bot] and 67 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group