• 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: Removable Disks (wrapping code)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removable Disks (wrapping code)


  • Subject: Re: Removable Disks (wrapping code)
  • From: Matthew Smith <email@hidden>
  • Date: Wed, 12 Nov 2003 10:23:19 +1100

on 11/11/03 4:48 AM, Christopher Rosado at email@hidden wrote:

> if month of (current date) is January then set newMonth to "01"
> if month of (current date) is February then set newMonth to "02"
> if month of (current date) is March then set newMonth to "03"
> if month of (current date) is April then set newMonth to "04"
> if month of (current date) is May then set newMonth to "05"
> if month of (current date) is June then set newMonth to "06"
> if month of (current date) is July then set newMonth to "07"
> if month of (current date) is August then set newMonth to "08"
> if month of (current date) is September then set newMonth to "09"
> if month of (current date) is October then set newMonth to "10"
> if month of (current date) is November then set newMonth to "11"
> if month of (current date) is December then set newMonth to "12"


If you are using AppleScript 1.9.2, that comes with Mac OS X 10.3 you can
write this as:

set newMonth to text 2 thru 3 of (((month of (current date) as integer) +
100) as text)

Although someone may point out an even better way to write it.

Version 1.9.2 included the ability to coerce the month into an integer.

--
Matthew Smith
_______________________________________________
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.

  • Follow-Ups:
    • Re: Removable Disks (wrapping code)
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: Removable Disks (wrapping code) (From: email@hidden (Christopher Rosado))

  • Prev by Date: Re: Script tell the wrong app !
  • Next by Date: Re: weird UI scripting problems
  • Previous by thread: Re: Removable Disks (wrapping code)
  • Next by thread: Re: Removable Disks (wrapping code)
  • Index(es):
    • Date
    • Thread