• 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: "do shell" vs. Plain old AppleScript nomenclature
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "do shell" vs. Plain old AppleScript nomenclature


  • Subject: Re: "do shell" vs. Plain old AppleScript nomenclature
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 23 Jul 2004 09:31:39 -0700

On Jul 23, 2004, at 8:58 AM, D. Mahaffy wrote:

copy (round (theTime / 3600) rounding down) to theHour

If you need to parse it out like that, this might be a bit shorter and more readable.

copy (theTime div hours) to theHour?

copy (round ((theTime - (theHour * 3600)) / 60) rounding down) to
theMinute

Copy (theTime - theHour * hours) div minutes to theMinute

copy ((theTime - (theHour * 3600)) - theMinute * 60) to theSeconds

copy theTime -TheHour * hours - theMinute * minutes to theSeconds

But why parse things out like that when you can do this:

time string of (current date)

-- Michelle

--
Support our troops. Bring them home NOW!
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >set computer name (From: Andre Vink <email@hidden>)
 >"do shell" vs. Plain old AppleScript nomenclature (From: "D. Mahaffy" <email@hidden>)

  • Prev by Date: Re: Strange path
  • Next by Date: Re: "do shell" vs. Plain old AppleScript nomenclature
  • Previous by thread: "do shell" vs. Plain old AppleScript nomenclature
  • Next by thread: Re: "do shell" vs. Plain old AppleScript nomenclature
  • Index(es):
    • Date
    • Thread