• 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: Manipulating text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Manipulating text


  • Subject: Re: Manipulating text
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 25 Sep 2009 10:06:44 -0500

A little looking-up and calculating lead me to this ...

set firstWord to "åæçœøπxnchdgrtsjdlvmfqq12345"
set charList to characters of firstWord
repeat with i from 1 to (count items of charList)
set charID to id of (item i of charList)
if (96 < charID) and (charID < 123) then
set charID to (charID - 32)
set item i of charList to (character id charID)
else if (223 < charID) and (charID < 254) then
set charID to (charID - 32)
set item i of charList to (character id charID)
else if (255 < charID) and (charID < 376) then
if (charID mod 2) = 1 then
set charID to (charID - 1)
set item i of charList to (character id charID)
end if
end if
end repeat
set firstWord to charList as text
log firstWord

Notice that "π" does not capitalize. There are more blocks in the unicode table that contain other upper/lower case pairs, so the script needs more else blocks. Have fun!

 _______________________________________________
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: Manipulating text
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Manipulating text (From: Jim Brandt <email@hidden>)

  • Prev by Date: Re: Illustrator CS 3 'open' command sometimes throws error 8700
  • Next by Date: Re: TImer
  • Previous by thread: Re: Manipulating text
  • Next by thread: Re: Manipulating text
  • Index(es):
    • Date
    • Thread