Re: Sintax for current date - Need help
Re: Sintax for current date - Need help
- Subject: Re: Sintax for current date - Need help
- From: Axel Luttgens <email@hidden>
- Date: Thu, 07 Apr 2005 18:51:35 +0200
Bernardo Hoehl wrote:
Hi List!
I want to manage the users of a Mac, and stop them from using
unauthorized applications during work time (between 09:00 and 17:00).
But I want to allow them to use these apps after work time.
I will declare a variable containning a list of forbiden applications,
and check time of current date (if greater than 09:00 or smaller than
17:00), check what apps are open, and kill the app if necessary.
My difficulty is regarding the "if" sintax for current date.
Could you comment my lines bellow? Are they currect?
Thank you,
Bernardo Höhl
Rio de Janeiro - Brazil
set
CurrentTime
to
time
of
(current date)
if
CurrentTime > 32400
and
CurrentTime < 61200
then
beep
-- do something, kill
whatever
end
if
Just change the "and" into an "or".
Seems it would be more logical. ;-)
Now, for the code's legibility (you know, some months later), you could
perhaps change "32400" into "9 * hours" and "61200" into "17 * hours"
as well.
HTH,
Axel
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden