Robert Carnegie
Joined: 01 Jun 2005 Posts: 53 Location: Scotland
|
Posted: Sat Jul 30, 2005 7:14 pm Post subject: Robert's AHkSleep, a trivial timer for application launch |
|
|
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%
|
|
|