AutoHotkey Community

It is currently May 26th, 2012, 6:46 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: "When" statement
PostPosted: July 16th, 2005, 12:13 pm 
Offline

Joined: July 16th, 2005, 11:39 am
Posts: 96
Chris, I've read that you intend to add scheduling to AHK. I've also read that
your priorities for AHK functionality are geared mostly toward hotkeys and task automation. Easy task scheduling is high on my wish list.

Would it be practical, cost-vs.-benefit-wise, without bloating the code, etc., to add a When statement? In other words, one that continuously monitors the system clock and triggers an event according to the When statement expression.

Example usage:
I work alternate shifts and sometimes it gets a bit difficult to keep track of which shift I need to show up for on any given day/night, or I might want a reminder of when I need to get up early to show up for a meeting.

Code:
When A_YDay= 203 And A_Hour = 16
 {
  MsgBox, You work Graveyard shift tomorrow. Reset your alarm.
  }


In the meantime, roundabout methods to do the same thing are welcome.
I've played around a bit using If statements and timers but haven't got quite the results I'm looking for.

I greatly appreciate all the work you and others of the AHK community have done, which have enabled me to create some of the utilities I've always wanted, without having to learn a regular programming language.

_________________
“yields falsehood when preceded by its quotation” yields falsehood when preceded by its quotation.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 16th, 2005, 3:05 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
You can program it with SetTimer and If statements just with a couple of extra lines od code.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 16th, 2005, 3:57 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Some kind of basic scheduling is planned, but I don't know when it will get done. Thanks for the syntax ideas.

Laszlo wrote:
You can program it with SetTimer and If statements just with a couple of extra lines of code.
Here is a related example: http://www.autohotkey.com/forum/viewtop ... =6402#6402


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 16th, 2005, 6:23 pm 
Thanks! Your scriptlet gives me something to work with. It avoids the bugs I had in my approach, like the scheduled action being performed more than once.


Report this post
Top
  
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: No registered users and 2 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