• 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: new (I think) time question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new (I think) time question


  • Subject: Re: new (I think) time question
  • From: Yvan KOENIG <email@hidden>
  • Date: Sun, 6 Sep 2009 19:28:40 +0200


Le 6 sept. 2009 à 19:12:17, Robert Poland a écrit :


On Sep 6, 2009, at 10:52 AM, Yvan KOENIG wrote:


Le 6 sept. 2009 à 18:37:38, Robert Poland a écrit :

Hi,

I can deal with hours and minutes but isn't there a way to convert a string (for example"6:01") directly to a time (string")?

For use as;
set wakeTime to "6:01"
set WakeUpTime to current date
set time of WakeUpTime to wakeTime
display dialog wakeTime
--> error "Can't make "6:01" into type integer"


maybe
set wakeTime to "6:01"
set WakeUpTime to short date string of (current date)
set WakeUpTime to date (WakeUpTime & space & wakeTime)
display dialog (time of WakeUpTime) as text

--> 0

It's more and more funny !

set wakeTime to "6:01"
set WakeUpTime to short date string of (current date)
set WakeUpTime to date (WakeUpTime & space & wakeTime)
display dialog (time of WakeUpTime) as text


log report:

tell current application
current date
--> date "dimanche 6 septembre 2009 19:26:48"
end tell
tell application "AppleScript Editor"
display dialog "21660"
--> {button returned:"OK"}
end tell

Résultat :

{button returned:"OK"}


Yvan KOENIG (VALLAURIS, France) dimanche 6 septembre 2009 19:28:34


 _______________________________________________
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: new (I think) time question
      • From: Deivy Marck Petrescu <email@hidden>
References: 
 >new (I think) time question (From: Robert Poland <email@hidden>)
 >Re: new (I think) time question (From: Yvan KOENIG <email@hidden>)
 >Re: new (I think) time question (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: date/Snow Leopard changed
  • Next by Date: Re: date/Snow Leopard changed
  • Previous by thread: Re: new (I think) time question
  • Next by thread: Re: new (I think) time question
  • Index(es):
    • Date
    • Thread