Thread View: demon.tech.mac
3 messages
3 total messages
Started by Rev. Nigel J. Coke-Woods
Sat, 13 Dec 1997 00:00
Telling the time in Applescript
Author: Rev. Nigel J. Coke-Woods
Date: Sat, 13 Dec 1997 00:00
Date: Sat, 13 Dec 1997 00:00
10 lines
942 bytes
942 bytes
I want to run an applescript which will check my email on startup, but only if before a certain time of the day. I know there is a shareware program called "Once per day", but is there a way of getting the time in applescript and performing a test on it? Nigel --- Rev. Nigel Coke-Woods, Methodist Minister Email Nigel@cokery.demon.co.uk http://www.Cokery.demon.co.uk
Re: Telling the time in Applescript
Author: John Rethorst
Date: Sat, 13 Dec 1997 00:00
Date: Sat, 13 Dec 1997 00:00
24 lines
1264 bytes
1264 bytes
In article <19971213183524193449@cokery.demon.co.uk>, Nigel@cokery.demon.co.uk (Rev. Nigel J. Coke-Woods) wrote: > I want to run an applescript which will check my email on startup, but > only if before a certain time of the day. I know there is a shareware > program called "Once per day", but is there a way of getting the time in > applescript and performing a test on it? > Figure out your certain time of day in seconds since midnight, e.g. 9 a.m. is 32400. Then run this script: set theDate to current date set theTime to time of theDate if theTime < 32400 -- your script here end if -- John R. Please delete initial 'x' from email address to reply.
Re: Telling the time in Applescript
Author: Simon Slavin
Date: Sun, 14 Dec 1997 00:00
Date: Sun, 14 Dec 1997 00:00
21 lines
1316 bytes
1316 bytes
In article <19971213183524193449@cokery.demon.co.uk>, Nigel@cokery.demon.co.uk (Rev. Nigel J. Coke-Woods) wrote: > [snip] is there a way of getting the time in > applescript and performing a test on it? Start with this AppleScript (complete in one line): return (time of (current date)) / 60 / 60 and work from there. PS: please don't cross-post between d.t.m and comp.sys.mac.system. Simon. -- Simon Slavin -- Computer Contractor. | Excessive quoting from Shakespeare: http://www.hearsay.demon.co.uk | gag me with a folio. Check email address for spam-guard. | -- sclerc@ernie.bgsu.edu (Susan Clerc) Junk email not welcome at this site. | I receive about 2.5 junk emails a day.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads