Re: [ANN] ScriptToEmail preview
Re: [ANN] ScriptToEmail preview
- Subject: Re: [ANN] ScriptToEmail preview
- From: has <email@hidden>
- Date: Fri, 28 Sep 2001 19:33:49 +0100
Hi Bill,
>
> Here's a preview of a little something I knocked up on a slow afternoon.
>
>
>
> Use it when posting your scripts to format them so they won't get chewed by
>
> the AS list server. (Woo-woo!)
>
>
Something like this has been done at least twice before,
Somehow this doesn't surprise me.:)
>
with two good
>
solutions, both of which wanted to be the one-and-only ultimate solution to
>
formatting problems with scripts on this mailing list. As far as I know, the
>
one written by Jonathan "Wolf" Rentzsch was actually used once (by me) on a
>
script posted to this list, and the other was never used even once. (If
>
either has been used more than that, I would be curious to hear about it.)
>
>
Those two solutions included routines to "decode" the formatted script so
>
that it could be copied and pasted into a script editor for compiling,
>
without editing. If I understand you correctly, yours might be more
>
successful because it is a one-way-only, format-for-human-readability
>
solution.
That's the idea, yes. [Hmm... thanks; better make this more obvious in the
documentation.]
Requiring a decoder is a bit of a Catch 22 situation: nobody else has one
(at least not to begin with), so what's the motivation for posting an
encoded script in the first place? Besides, if machine-readable encoding
wasn't a problem to begin with, we'd all be posting in hexa already.:)
ScriptToEmail's output is as human-readable as I could make it. Which is to
say; as readable as any of the hand-cobbled methods folk currently indulge
in. Except it's much more convenient than doing it by hand. Hopefully
this'll encourage folks to adopt it (...and thus a standard is born;).
Including a download link for STE in the message body should also help
(...or will do, once I've uploaded a final copy so I can link to it).
Including STE's own info in someone else's message is maybe a bit cheeky,
but it's important as folks are more likely to get themselves a copy if
they know where to find it. It should be benignly self-propagating, if you
like.
I'll aim to have the final version posted for next week. Meantime a bit of
user-testing definitely wouldn't hurt (hint-hint:). Then we can see if I've
cracked the much more difficult Human Problem...<g>
Cheers,
has
p.s. Getting rid of STE wraps automatically is as easy as:
set oldTIDs to text item delimiters of AppleScript
set text item delimiters of AppleScript to (return & "[NO-BREAK]")
set theText to every text item of (the clipboard)
set text item delimiters of AppleScript to ""
get theText as string
set the clipboard to result
set text item delimiters of AppleScript to oldTIDs
Works on clipboard contents, as before. Converting special characters I'll
leave as a challenge for some other time.;)