AutoHotkey Community

It is currently May 27th, 2012, 12:44 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: March 19th, 2010, 11:36 pm 
Offline

Joined: November 28th, 2009, 4:45 am
Posts: 3089
If you realy must use a SetTimer Change the function so it returns the miliseconds till the time instead of sleeping them.
Code:
#Persistent
msTill(Time) {
ST_Hour:=SubStr(Time, 1 ,2)
ST_Min:=SubStr(Time, 3 ,2)
ST_Sec:=(SubStr(Time, 5 ,2)<>"" ? SubStr(Time, 5 ,2) : "00")
STime:=(((ST_Hour-A_Hour)*60+(ST_Min-A_Min))*60+(ST_Sec-A_Sec))*1000
STime:=STime<0 ? STime+86400000 : STime
Return %STime%
}

Sleep msTill(1330)
MsgBox You can use with sleep

SetTimer Dest, % "-" msTill(140030) ;single run because running at intervals of the time till your destination is Silly
return

Dest:
MsgBox Or With a SetTimer
Return

Edit: Tuncay has added this to his Library


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bon, Google Feedfetcher, maul.esel, Yahoo [Bot] and 16 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