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

RE: Rot 13


  • Subject: RE: Rot 13
  • From: "Bourque, Jason" <email@hidden>
  • Date: Mon, 2 Jul 2001 08:04:36 -0400

What is rot13?

Jason

> ----------
> From: Paul Skinner
> Sent: Monday, July 2, 2001 12:01 AM
> To: AppleScript List; Michelle Steiner
> Subject: Re: Rot 13
>
> on 7/1/01 9:22 PM, Michelle Steiner wrote:
>
> > 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
>
> Snip rot13 script
>
> Not my code. Sorry I don't have the author's name recorded.
> The rot13 text given in the call is a clue.
>
> on ROT13(theTEXT)
> --on ROT13(theTEXT)
> "ABCDEFGHIJKLMNOPQRSTUVWXYZ" & "abcdefghijklmnopqrstuvwxyz"
> set alphabets to result
> "NOPQRSTUVWXYZ" & "ABCDEFGHIJKLM" & "nopqrstuvwxyz" & "abcdefghijklm"
> set rotAlphabets to result
> ----------
> set theTEXT to items of theTEXT
> set sentinal to ASCII character 1 -- (sentinal & character) == not
> processed
> set text item delimiters to {sentinal}
> set theTEXT to sentinal & theTEXT as string -- all unprocessed
> repeat with x from 1 to (26 + 26)
> set text item delimiters to {sentinal & item x of alphabets}
> set theTEXT to text items of theTEXT
> set text item delimiters to {item x of rotAlphabets}
> set theTEXT to theTEXT as string
> end repeat
> -- clean up
> set text item delimiters to {sentinal}
> set theTEXT to text items of theTEXT
> set text item delimiters to {""}
> return theTEXT as string
> --end ROT13
> end ROT13
>
> ROT13("Trbetr Yhpnf vf n zrqvbper gnyrag jub tbg ernyyl yhpxl jvgu Fgne
> Jnef.")
>
> --
> "AppleScript is digital duct tape."
> Paul Skinner


  • Follow-Ups:
    • RE: Rot 13
      • From: Bill Briggs <email@hidden>
  • Prev by Date: Re: Search and Replace
  • Next by Date: Re: PORTALS IN FILEMAKER
  • Previous by thread: Re: Rot 13 (OT)
  • Next by thread: RE: Rot 13
  • Index(es):
    • Date
    • Thread