Re: Stop a script at a certain time?
Re: Stop a script at a certain time?
- Subject: Re: Stop a script at a certain time?
- From: Emmanuel <email@hidden>
- Date: Mon, 20 Dec 2004 18:14:00 +0100
At 11:50 AM -0500 20/12/04, Aaron Rosenblum wrote:
Hey all,
Is there an easy way to convert from the time in total seconds (as
returned by "time of (current date)") to a user readable "military"
or "AM/PM" time string and back in AS? I have been looking around
and can't seem to find any such functions, but I thought I'd ask.
ie
0600 hours would be 21600 seconds and 21600 seconds would be 0600 hours.
What I'd really like to do is compare two times without the date so
that I can check it with my script and tell it to quit running if it
gets to be a certain time. My thought would be to store the time in
total seconds and then compare them with LT,GT operators, but I'd
like to be able to use something more readable for the user so they
can specify time in AM/PM or even military...
Not a full solution to your problem, but you may want to know that a
property of dates is "time":
time of (current date)
-- 65520 (it's 6:12 pm here = 12*60 + 18*3600 = 65520) (believe it or
not I did not edit the result)
Emmanuel
_______________________________________________
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