Start Program based on Time

Hello everyone,

We have a program here at Gateway School District called Reading Counts that the kids use to take quizes on books they have read and then earn stuff with those points. Long story short we have kids that when there is in door recess like to take quizes for others… I would like to write a script to run before the program which would check to see what time it is and if it is between say 12:30pm and 1pm would not allow them to open Reading Counts. Since we will need to put this on each machine I would also like to add a maintance time in there too so that on Friday from 2pm till the end of the day the program can not be run because of maintance. Any ideas or suggestions? I normally try to look this stuff up myself, but on this one I have no idea where to begin.

Thanks a head of time.

You could check intervals as follow:

set t to time string of (current date)

set AppleScript's text item delimiters to ":"
set {h, m, s} to t's text items
set AppleScript's text item delimiters to {""}

if h is "12" then ¬
	if m is greater than "30" then ¬
		return --> higher than 12:30 and lower than 13:00!!!

launch application "Reading Counts"


  • Are you sure kids don’t know where “Reading Counts” is located and surpass your script?
  • Are you sure your kids won’t change the date? (in the control panel)
    If answer is “YES”, then you can simply place your script saved as application in their desktops. :wink:
    And the methoud would be the same for the manteinance issue.

Works good. Thanks.

Two questions though: How did you make that little down pointing thing that looks like a return charactor at the end of the if statments? How would I get it to check and see if its friday or not?

Again thanks!

The continuation character:

if weekday of (current date) is Friday then beep 3