• 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: date/Snow Leopard changed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date/Snow Leopard changed


  • Subject: Re: date/Snow Leopard changed
  • From: Yvan KOENIG <email@hidden>
  • Date: Wed, 2 Sep 2009 17:31:55 +0200


Le 2 sept. 2009 à 17:11:13, Robert Poland a écrit :

set WakeUpTime to "6:01"

set SleepTime to "21:01"

set nowTime to (current date)

set wakeTime to date (date string of nowTime & ":" & WakeUpTime) -- NOTE use of ":"

set bedTime to date (date string of nowTime & ":" & SleepTime) -- NOTE use of ": "


display dialog nowTime & return & bedTime & return & wakeTime as string


if (nowTime is less than bedTime) and (nowTime is greater than wakeTime) then

display dialog "You should be awake"

end if

Isn't it what is covered by the contents of page 13 in the RN-Applescript.PDF ?


Now we must use:

set WakeUpTime to (1 + (6 * 60)) * minutes
set SleepTime to (1 + (21 * 60)) * minutes
set nowTime to (current date)
set wakeTime to (current date)
set time of wakeTime to WakeUpTime
set bedTime to (current date)
set time of bedTime to SleepTime
display dialog nowTime & return & bedTime & return & wakeTime as string

if (nowTime is less than bedTime) and (nowTime is greater than wakeTime) then
display dialog "You should be awake"
end if

Yvan KOENIG (VALLAURIS, France) mercredi 2 septembre 2009 17:31:31


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: date/Snow Leopard changed
      • From: Robert Poland <email@hidden>
References: 
 >date/Snow Leopard changed (From: Robert Poland <email@hidden>)

  • Prev by Date: date/Snow Leopard changed
  • Next by Date: Re: Script Fails in Snow Leopard - Adobe Unit Types.osax
  • Previous by thread: date/Snow Leopard changed
  • Next by thread: Re: date/Snow Leopard changed
  • Index(es):
    • Date
    • Thread