🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.tech.mac
Article #2236

Re: Telling the time in Applescript

#2236
From: John Rethorst
Date: Sat, 13 Dec 1997 00:00
24 lines
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. 
Technical Details
Message-ID: <xjcr2-1312971842440001@cu-dialup-0036.cit.cornell.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <19971213183524193449@cokery.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10b5a2,f487c78007553994
X-Google-Attributes: gid10b5a2,public
X-Google-Thread: 1156c9,f487c78007553994
X-Google-Attributes: gid1156c9,public
From: xjcr2@cornell.edu (John Rethorst)
Subject: Re: Telling the time in Applescript
Date: 1997/12/13
Message-ID: <xjcr2-1312971842440001@cu-dialup-0036.cit.cornell.edu>
X-Deja-AN: 297963949
Sender: jcr2@cornell.edu (Verified)
References: <19971213183524193449@cokery.demon.co.uk>
Organization: Cornell University
Newsgroups: demon.tech.mac,comp.sys.mac.system