AutoHotkey Community

It is currently May 26th, 2012, 2:20 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: January 16th, 2009, 5:05 pm 
Offline

Joined: June 16th, 2007, 3:23 am
Posts: 280
How to run a timer while the script is running and when it reach a certain time a variable is reset to 0 and the script just continue. Is those thing slow down much the script?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 16th, 2009, 5:23 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
You will not notice the slowdown:
Code:
SetTimer, Reset, 1000
index = 0
Loop
 ToolTip % (index := index+1)
KeyHistory
Sleep, 2000
ExitApp
Esc::Exitapp
Reset:
index= 0
Return

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2009, 2:22 am 
Offline

Joined: June 16th, 2007, 3:23 am
Posts: 280
Can we put that on the computer clock, like a agenda: at 7pm he will tell you to watch the tv.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2009, 3:31 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Yes

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2009, 9:49 pm 
Offline

Joined: June 16th, 2007, 3:23 am
Posts: 280
HotKeyIt wrote:
Yes


Ok how?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2009, 10:16 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
There are many ways, you need to try it, search in forum for example scripts, here very easy examle:
Code:
remindme = 1900 ;time 19:00
Loop
{
 now := SubStr(A_Now, 9, 4) ;Get the part hours and minutes
 if now = %remindme%
   MsgBox, Watch now, Watch now
}

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: G. Sperotto, Google Feedfetcher, poserpro and 14 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