AppleScript e-mail encode/decode tool
AppleScript e-mail encode/decode tool
- Subject: AppleScript e-mail encode/decode tool
- From: Bill Cheeseman <email@hidden>
- Date: Sat, 17 Feb 2001 08:27:00 -0500
A script that uses the clipboard to encode and decode AppleScripts for
e-mail transmission has been posted by Wolf Rentzsch on the AppleScript
Implementors list. He invited somebody to post it on applescript-users, too,
but I'm going to make a couple of changes to it this morning before I do so.
I will identify it as version 1.0.1WJC, in case others are also making
changes to it.
A couple of comments:
I realize that, with more than one encode/decode script floating around and
a C utility promised, we will now have a Tower of Babel problem: lots of
mutually incompatible encoded scripts. So Chris and Chuq need to keep
working on this issue from their end. Maybe some enterprising soul will
write a utility to recognize which encoding script was used and launch the
correct decoding script -- but it won't be me! One of the changes I will
make to Wolf's script is to have it include his encode/decode script name
and version number in the encoded output, and a warning in the decode branch
if the encoded script doesn't include the same comment string.
I prefer Wolf's technique, but not just because it uses the clipboard. I
prefer having escaped hex codes over made-up equivalents in an encoded
script, for fear that some people will think the equivalents are part of the
language. I understand the counter-argument (that the equivalents are more
human-readable).
Note that Wolf's script does not convert some un-e-mailable symbols to their
longer AppleScript equivalents (e.g., greater than or equal). It only
encodes single characters as their hex equivalents. At present, it doesn't
encode all the characters that it should, but I'll fix that.
Also, note that none of these scripts converts a script to HTML that can be
manually copied back from a web page and compiled in a script editor without
change. If you're interested in doing that, see the Script2HTML script in
the "Scripts" chapter of The AppleScript Sourcebook.
-
Bill Cheeseman, Quechee, Vermont <
mailto:email@hidden>
The AppleScript Sourcebook
<
http://www.AppleScriptSourcebook.com/>
Vermont Recipes-A Cocoa Cookbook
<
http://www.stepwise.com/Articles/VermontRecipes/>