AutoHotkey Community

It is currently May 27th, 2012, 12:06 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: October 9th, 2009, 5:46 am 
Let me give you some background information on what I am trying to do here.

What my goal is with this script is for it to check my system clock, if the time in the clock = 09:00, then it should run the program in the directory I have selected.

Everything works fine, just one issue. The script will work if I set the time to load the program equal to the time it currently is then run it. However, if I set the time to run the program a few (I am using 1 just to speed things up) minutes ahead of when I execute the script, it will never run the program.
My if statement is in a loop, this does not solve the issue. The console is checking for the time but for some reason the if will not return true, even if it is.

I'm having a sort of difficult time explaining this..bottom line is..how can I get the script to keep refreshing the if statement? And when the requirements are met..do whats in the {}?

Code:
FormatTime, TimeString, HH:mm, HH:mm
Loop{
If TimeString = 00:45 ;Its 12:45 here
{
Run C:\Program FIles\Program\Program.exe
exit
}
}


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 9th, 2009, 6:05 am 
Code:
Loop
{
  FormatTime, TimeString, HH:mm, HH:mm
  If TimeString = 00:45 ;Its 12:45 here
  {
    Run C:\Program FIles\Program\Program.exe
    break
  }
}


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 9th, 2009, 6:11 am 
Z_Gecko wrote:
Code:
Loop
{
  FormatTime, TimeString, HH:mm, HH:mm
  If TimeString = 00:45 ;Its 12:45 here
  {
    Run C:\Program FIles\Program\Program.exe
    break
  }
}

Thanks


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Leef_me, rjgatito, XstatyK, 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