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 

Robert's AHkSleep, a trivial timer for application launch

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Robert Carnegie



Joined: 01 Jun 2005
Posts: 53
Location: Scotland

PostPosted: Sat Jul 30, 2005 7:14 pm    Post subject: Robert's AHkSleep, a trivial timer for application launch Reply with quote

This script, compiled, executes a Sleep specified on the command line, and then runs the rest of the command line as a new command. Terms containing a space are presumed to be quoted.

I'm open to suggested refinements.

One use is precise control of launch time of applications in Windows XP "Scheduled Tasks", which, as far as I can see, can only be set to the nearest minute. Perhaps this need is rather unusual; it happens I have a digital radio for PC that can make recordings by relaunching its application from Tasks at the desired time - and to make one recording right after another this way is pretty tricky on timing.

As for where I find radio that's actually worth recording - I'm in the United Kingdom, so I get BBC!

Code:

#SingleInstance off

Sleep, %1%

Params=

Loop, %0%  ; For each parameter:
{
    If ( A_Index > 1 )
    {
        Param := %A_Index%
        If (InStr(Param, " "))
            Params = %Params% "%Param%"
        Else
            Params = %Params% %Param%
    }
}

RunWait, %Params%
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions 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