• 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: How can I simplify the math in this script?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I simplify the math in this script?


  • Subject: Re: How can I simplify the math in this script?
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 16 Jun 2008 18:36:41 -0500

Is this what you are looking for ...

set Launch3G to "July 11, 2008, 6 PM"
repeat
set timeToLaunch to (date Launch3G) - (current date)
set WeeksToLaunch to (timeToLaunch div weeks)
set DaysToLaunch to (timeToLaunch mod weeks) div days
set HoursToLaunch to (timeToLaunch mod days) div hours
set MinsToLaunch to (timeToLaunch mod hours) div minutes
set SecondsToLaunch to (timeToLaunch mod minutes)
display dialog "iPhone 3G will be launched in exactly" & return & ¬
WeeksToLaunch & " weeks, " & DaysToLaunch & " days, " & HoursToLaunch & " hours, " & MinsToLaunch & " minutes, " & SecondsToLaunch & " seconds." giving up after 1
end repeat


On Jun 16, 2008, at 5:51 PM, Michelle Steiner wrote:

set Launch3G to "July 11, 2008, 6 PM"
repeat
set timeToLaunch to (date Launch3G) - (current date)
set WeeksToLaunch to timeToLaunch div weeks
set DaysToLaunch to (timeToLaunch - WeeksToLaunch * weeks) div days
set HoursToLaunch to (timeToLaunch - WeeksToLaunch * weeks - DaysToLaunch * days) div hours
set MinsToLaunch to (timeToLaunch - WeeksToLaunch * weeks - DaysToLaunch * days - HoursToLaunch * hours) div minutes
set SecondsToLaunch to (timeToLaunch - WeeksToLaunch * weeks - DaysToLaunch * days - HoursToLaunch * hours - MinsToLaunch * minutes)
display dialog "iPhone 3G will be launched in exactly" & return & ¬
WeeksToLaunch & " weeks, " & DaysToLaunch & " days, " & HoursToLaunch & " hours, " & MinsToLaunch & " minutes, " & SecondsToLaunch & " seconds." giving up after 1
end repeat
_______________________________________________
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: How can I simplify the math in this script?
      • From: Michelle Steiner <email@hidden>
References: 
 >How can I simplify the math in this script? (From: Michelle Steiner <email@hidden>)

  • Prev by Date: How can I simplify the math in this script?
  • Next by Date: Re: How can I simplify the math in this script?
  • Previous by thread: How can I simplify the math in this script?
  • Next by thread: Re: How can I simplify the math in this script?
  • Index(es):
    • Date
    • Thread