• 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
Rot 13
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rot 13


  • Subject: Rot 13
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 1 Jul 2001 18:22:11 -0700

Can anyone come up with a better way than the following to impliment
rot13 in Applescript? I tried to figure out a way to do it with TIDs,
but I haven't been able to figure that out.

--Michelle


set oldText to "Zvpuryyr Fgrvare"
set newText to ""
repeat with i in characters of oldText
set oldAscii to ASCII number i
if oldAscii is greater than 64 and oldAscii is less than 91 then
if oldAscii is less than 78 then
set newText to newText & (ASCII character (oldAscii + 13))
else
set newText to newText & (ASCII character (oldAscii - 13))
end if
else if oldAscii is greater than 96 and oldAscii is less than 123 then
if oldAscii is less than 110 then
set newText to newText & (ASCII character (oldAscii + 13))
else
set newText to newText & (ASCII character (oldAscii - 13))
end if
else
set newText to newText & (i as string)
end if
end repeat

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Follow-Ups:
    • Re: Rot 13
      • From: Paul Skinner <email@hidden>
  • Prev by Date: Akua Sweets V1.42
  • Next by Date: Re: Rot 13
  • Previous by thread: Akua Sweets V1.42
  • Next by thread: Re: Rot 13
  • Index(es):
    • Date
    • Thread