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

How can I simplify the math in this script?


  • Subject: How can I simplify the math in this script?
  • From: Michelle Steiner <email@hidden>
  • Date: Mon, 16 Jun 2008 15:51:10 -0700

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

-- Michelle

-- 
"Liberals cannot count on conservatives being associated with corruption, incompetence or an unpopular war forever."
--Rich Lowery, The National Review


 _______________________________________________
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: Jeff Porten <email@hidden>
    • Re: How can I simplify the math in this script?
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Get name of desktop image. Is this a bug?
  • Next by Date: Re: How can I simplify the math in this script?
  • Previous by thread: Re: Get name of desktop image. Is this a bug?
  • Next by thread: Re: How can I simplify the math in this script?
  • Index(es):
    • Date
    • Thread