AutoHotkey Community

It is currently May 26th, 2012, 1:01 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: December 14th, 2007, 12:11 am 
Offline

Joined: June 1st, 2005, 12:36 pm
Posts: 174
Hi,

I'm searching for a simple script that I could use so that I don't have to come up with one from scratch. What it should do - in lay terms - is this:

perform action 1 for x seconds
then, perform action 2 for x seconds
repeat 10 times

I used the search but couldn't find something like that (yeah, I know, it's probably bloody simple to code, but I never needed something like that).

_________________
DonationCoder.com brings AHK to the newbies!
Fan of AutoHotkey? Consider an occasional donation to its developer, Chris Mallett.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: December 14th, 2007, 1:32 pm 
brotherS wrote:
I know, it's probably bloody simple to code

You are right.It is so simple that I can't imagine wich kind of help you need.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2007, 2:46 pm 
Offline

Joined: October 10th, 2005, 10:44 am
Posts: 299
Location: Germany
Here's a suggestion:
Code:
Loop, 10 {
   foo()
   Sleep, %delay1%
   bar()
   Sleep, %delay2%
}

Now, that doesn't actually perform the respective action for x seconds - for that you'd probably use SetTimer with some kinda boolean variable to initiate the transition.

_________________
Improving my world, one script at a time.
Join the AutoHotkey IRC channel: irc.freenode.net #autohotkey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 14th, 2007, 6:03 pm 
Offline

Joined: June 1st, 2005, 12:36 pm
Posts: 174
Ace_NoOne wrote:
Here's a suggestion:
Code:
Loop, 10 {
   foo()
   Sleep, %delay1%
   bar()
   Sleep, %delay2%
}

Now, that doesn't actually perform the respective action for x seconds - for that you'd probably use SetTimer with some kinda boolean variable to initiate the transition.

Right, totally forgot about that... thanks a lot!

_________________
DonationCoder.com brings AHK to the newbies!
Fan of AutoHotkey? Consider an occasional donation to its developer, Chris Mallett.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher, Tilter_of_Windmills, vsub and 12 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