Re: Anyone got the time?
Re: Anyone got the time?
- Subject: Re: Anyone got the time?
- From: Andrew Oliver <email@hidden>
- Date: Wed, 21 Jul 2004 00:00:56 -0700
This is easily done using AppleScript's 'current date' and a little math:
set theTime to time of (current date)
set theHour to theTime div hours
'time of (current date)' returns the number of seconds since midnight. A
simple division by hours returns a number from 0 to 23 depending on the hour
which you can plug into the rest of your script.
Andrew
:)
On 7/20/04 11:28 PM, "Jack Miller" <email@hidden> wrote:
>
Hi,
>
>
I'm trying to code a little applescript to open a program if the time
>
is not between 8 am and 12 pm (0800 to 1200). I've got the rest of the
>
script done, I just need to know what I can use to get the system time
>
(not the whole lot in that
>
format-that-I-can't-really-remember-that-includes-the-data...)
>
>
Time by itself (without caps) is recognition, but both the finder and
>
the app that I want to open can't get it.
>
>
Should I go back to obj-c?
>
>
Many Thanks,
>
>
Jack Miller
>
===================
>
All copyrights are property of their respective owners.
>
*Insert disclaimer here*
>
>
[demime 0.98b removed an attachment of type application/pkcs7-signature which
>
had a name of smime.p7s]
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.