>My AppleScript menu in Emailer has the ROT encode AppleScript which will 
>encode/decode any part of an Emailer message which has been selected.  My 
>question is whether a copy this AppleScript can be modified to be used in 
>general to encode/decode text in other applications, and if so, how in 
>general does one go about doing this?  I'm fairly AppleScript-illiterate, 
>obviously!

In theory, you should be able to either modify, or write a new script, 
that will work with any text editor that allows scripting of the text. Or 
if no scripting is allowed, you should be able to use it on limited 
amounts of text as long as copy and paste is supported (you can copy it 
to the clipboard, run the script that will then take the clipboard 
contents, modify it as needed, then place it back in the clipboard where 
it can be pasted back into the document).

ROT 13 is a very simple system to use, which is why you can write your 
own without much trouble. The ROT 13 algorithm is simply, take A = 1, B = 
2, C = 3 and so on, then add 13 to the number value (rolling 27 to 1, 28 
to 2 and so on), and then take the letter that originally lined up with 
that number.

So an example would be A = 1, 1 + 13 = 14, 14 = L, so A becomes L.

This might actually prove to be a good script to become less AppleScript 
illiterate with. You can learn how to script control of the clipboard, 
and how to modify text strings. It will teach you about variables and 
loops in AppleScript.

I'd think, if you have a reasonable AppleScript tutorial or reference 
available to yourself, you could learn how to make a fairly universal ROT 
13 applescript in the course of a single evening's project.

-chris
<http://www.mythtech.net>

___________________________________________________________________________
To unsubscribe send a mail message with a SUBJECT line of "unsubscribe" to
<[EMAIL PROTECTED]>  or  <[EMAIL PROTECTED]>

Reply via email to