Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

How to Auto Execute Script M-F at 5:00 PM?


  • Please log in to reply
5 replies to this topic
Alphacsulb
  • Members
  • 5 posts
  • Last active: Sep 24 2010 04:38 PM
  • Joined: 10 Dec 2008
Ive been searching and cannot find out how to do this.

I have a script that I use to log the hours of my employees with an online program. I want to execute this script at 5:00PM Monday through Friday automatically.

How do I do that?

WinWait, Program Manager, FolderView
IfWinNotActive, Program Manager, FolderView, WinActivate, Program Manager, FolderView
WinWaitActive, Program Manager, FolderView
MouseClick, left,  1229,  20
MouseClick, left,  1229,  20
Sleep, 100
WinWait, Qqest Time and Attendance Systems - Mozilla Firefox, 
IfWinNotActive, Qqest Time and Attendance Systems - Mozilla Firefox, , WinActivate, Qqest Time and Attendance Systems - Mozilla Firefox, 
WinWaitActive, Qqest Time and Attendance Systems - Mozilla Firefox, 
MouseClick, left,  796,  403
Sleep, 100
WinWait, Martin & Chapman Co. - Time Card - Mozilla Firefox, 
IfWinNotActive, Martin & Chapman Co. - Time Card - Mozilla Firefox, , WinActivate, Martin & Chapman Co. - Time Card - Mozilla Firefox, 
WinWaitActive, Martin & Chapman Co. - Time Card - Mozilla Firefox, 
MouseClick, left,  1153,  139
Sleep, 100
WinWait, Qqest Time and Attendance Systems - Mozilla Firefox, 
IfWinNotActive, Qqest Time and Attendance Systems - Mozilla Firefox, , WinActivate, Qqest Time and Attendance Systems - Mozilla Firefox, 
WinWaitActive, Qqest Time and Attendance Systems - Mozilla Firefox, 
MouseClick, left,  1268,  17
Sleep, 100


poo_noo
  • Members
  • 251 posts
  • Last active: Jan 28 2015 08:33 PM
  • Joined: 08 Dec 2006
this should get you started.

<!-- m -->http://www.autohotke...pic.php?t=32170<!-- m -->
Paul O

meta_guest
  • Guests
  • Last active:
  • Joined: --
Simple and easy:
loop {									; loop forever

  if A_WDay between 2 and 6				; is day monday - friday?

  {

    if (A_Hour = 17) and (A_Min = 0)	; is time 5:00 pm?

    GoSub, DailyTask					; yes - do your daily task

  }

  sleep, 1000 * 60						; sleep for 60 seconds

}



DailyTask:

  ; whatever needs to be done

  return


silveredge78
  • Members
  • 499 posts
  • Last active: Mar 14 2014 03:19 AM
  • Joined: 25 Jul 2006
Assuming Windows XP, click Start...All Programs...Accessories...System Tools...Scheduled Tasks.

Add a new task. Set the time for 5pm and the days as M-F. Easy. :) I use this daily for a couple scripts that need to run at set times. What is good about this is that it does not leave the program running all day long waiting for the right time/day. I've found that any AHK program running takes up 4-8 MB. No point wasting the RAM when you don't need it.
SilverEdge78

Alphacsulb
  • Members
  • 5 posts
  • Last active: Sep 24 2010 04:38 PM
  • Joined: 10 Dec 2008
The scheduled task did the job. Now I just need to perfect my script.

silveredge78
  • Members
  • 499 posts
  • Last active: Mar 14 2014 03:19 AM
  • Joined: 25 Jul 2006
Glad to hear that worked for you. Good luck on the script.
SilverEdge78