I put together this simple applescript to alert me the time at a given interval of time.
I wasn't able to make the script run at a given interval of time so I just used CronniX to set up a crontab to run this script every 15 minutes. You can also do this using the terminal, but CronniX is so easy to use ;-)
copy the (current date) to theDate
copy the time string of (theDate) to theTime
copy the date string of (theDate) to theCurrentDate
tell application "GrowlHelperApp"
set the allNotificationsList to ¬
{"Current Time"}
set the enabledNotificationsList to ¬
{"Current Time"}
register as application ¬
"Clock Alert" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "WindowClock"
notify with name ¬
"Current Time" title ¬
theTime as string description ¬
theCurrentDate as string application name ¬
"Clock Alert"
end tell
You can also save it as an app.
I'm by no means a professional, but I use this script every 15 minutes so I thought I might share it.
That's a very useful script! However, I was wondering if you might be able to help me configure CronniX. I copied your script into Script Editor, saved it as an application, then loaded the application into CronniX. I can manually run the script from CronniX's "Task" menu bar, but it doesn't seem to want to run when I try to create a schedule for it. I'd like my Script to run on the hour, but so far my efforts have proved fruitless. When I open the "Edit" option, I insert [ /usr/bin/open "/Applications/Current Time.app" ] into the "Command" box. I then place a checkmark beside "Hour" into the Schedule above. I then click "Apply", then I "Save", then I quit CronniX. Any idea what I could be doing wrong to keep my scheduler from executing? Thanks!
You can just paste
"/Applications/Current Time.app"
into the Command box.
This has to be in a System Crontab event, and not a User event. I do not know why, but that have been my experience. You must have admin access. Click File, Open System Crontab.
thelouisguy wrote:You can just paste
"/Applications/Current Time.app"
into the Command box.
This has to be in a System Crontab event, and not a User event. I do not know why, but that have been my experience. You must have admin access. Click File, Open System Crontab.
Try this and let me know
That was the problem. I had been setting it as an User Event. Setting it as a System Event made it work! Thanks man, you have a very useful script!
Does anybody know what to get the icon that appears in Growl notifications to display the current time? Right now, my clock alert script just gets the icon for apples clock app. the default time on it is 6 o'clock. So, any time the notification pops up, it displays the current time in text where text normally goes, but the icon always says 6 o'clock.
It's not big deal, but it would make this script even more aesthetically pleasing.
thelouisguy wrote:Does anybody know what to get the icon that appears in Growl notifications to display the current time? Right now, my clock alert script just gets the icon for apples clock app. the default time on it is 6 o'clock. So, any time the notification pops up, it displays the current time in text where text normally goes, but the icon always says 6 o'clock.
It's not big deal, but it would make this script even more aesthetically pleasing.