• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Time


  • Subject: Re: Time
  • From: Paul Skinner <email@hidden>
  • Date: Thu, 27 Sep 2001 09:47:21 -0400

on 9/27/01 8:39 AM, Steve Thompson wrote:

> Do you want a script to run at a certain time? If so, download/install the
> iDo Script Scheduler
>
Very cool tool. Very stable.

> If you want the script to run until a specific time, you have to create a
> continuous loop and check the current date against your criteria in that
> loop. This is messy and slows down the machine it's running on
>
Not if you only check the time on idle and set the idle interval to a
minute or more. Of course this limits accuracy, but I doubt that kind of
accuracy is what is needed here. You may have to tweek this example to fit
your time format & flavor.

--begin script--Save as a stay open Applet.
on idle
set AppleScript's text item delimiters to " "
set now to text items of time string of the (current date)
set AppleScript's text item delimiters to ":"
set now to text items of item 1 of now & item 2 of now
-->{"9", "19", "04", "AM"}
set AppleScript's text item delimiters to ""
set theMinutes to ((item 2 of now) as number)
if item 1 of now is "9" and (theMinutes is greater than 30) and item 4
of now is "AM" then
beep 9
--or run script or whatever...
end if
return 60
end idle
--end script

> On 27/9/01 12:54 pm, "david atyahoo" <email@hidden> wrote:
>
>> Hi all
>>
>> You know the story "new(ish) to AppleScript"
>>
>>
>> If I want something to happen at a specific time e.g. 9:30pm what would the
>> code be.
>>
>> Thanks
>>
>> David

--
Paul Skinner


References: 
 >Re: Time (From: Steve Thompson <email@hidden>)

  • Prev by Date: Re: Scripting Startup Disk?
  • Next by Date: OutLook 5 HTML encoding new mail
  • Previous by thread: Re: Time
  • Next by thread: Re: Time
  • Index(es):
    • Date
    • Thread