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: Michelle Steiner <email@hidden>
- Date: Mon, 20 Dec 2004 10:15:48 -0700
On Dec 20, 2004, at 9:50 AM, Aaron Rosenblum wrote:
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.
set current_time to time of (current date)
set this_hour to current_time div hours
set these_minutes to (current_time mod hours) div minutes
set mil_time to (strings -2 through -1 of ("0" & this_hour as string))
& ¬
(strings -2 through -1 of ("0" & these_minutes as string))
set display_time to mil_time & " hours"
and back:
set now to strings 1 through 2 of mil_time & ":" & strings 3 through 4
of mil_time
set now_seconds to time of date now
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.
Why without the date?
--
"Beware the march of ideas."
_______________________________________________
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