Re: Admin: a suggestion on the script corruption problem.
Re: Admin: a suggestion on the script corruption problem.
- Subject: Re: Admin: a suggestion on the script corruption problem.
- From: "Arthur J Knapp" <email@hidden>
- Date: Sun, 18 Feb 2001 18:16:23 -0500
>
Date: Sun, 18 Feb 2001 12:25:12 -0800
>
From: Chris Nebel <email@hidden>
>
Arthur J Knapp wrote:
>
> Well, equivalents that are more or less useless, since the darn compiler
>
> forces them to be replaced by their high-bit synonym.
>
... I forgot to mention this
>
initially, but part of my scheme is to introduce an extra preference that
>
says, in essence, "decompile using straight ASCII."
Very cool! :)
>
... (I have yet to figure
>
out some way to express this that won't completely befuddle novices.)
This will no doubt bother non-novices, but how about calling the
preference, "Email-friendly syntax".
(yuk, that sounds goofy, forget I said it) ;-)
>
My point above was that there are only two places where I'd have to introduce
>
entirely new tokens for existing things
Right, good stuff. One comment:
<< and >> are the obvious choices for chevrons, but I am a little
concerned about using the backslash for continuation, and here's why:
There are other languages that can embed AppleScript source code
directly into their own code, (stored as native strings), for on the
fly compiling; Frontier, MacPerl, RealBasic, and JavaScript OSA
amoung them. If someone wanted to have this AppleScript-string code
in it's straight ASCII syntax, then the backslash would have to be
escaped. Perhaps it's not that big a deal, but as anyone who has ever
used a regular expression scheme in AppleScript can tell you, escaping
escape sequences can become very confusing very fast. ;-)
I nominate good old forward-slash, / :)
Otherwise, some of my JavaScript for OSA code will end up looking
like this:
var osa = new MacOS.OSA( MacOS.OSA.AppleScript );
var src = "\
display dialog \"Hello\" \\\
default answer \"World\" \\\
buttons {\"Cancel\", \"Hello\", \"World\"} \\\
default button \"World\" \\\
with icon note \\\
giving up after 60";
osa.compile(src);
osa.run()
rather than the much more readable:
var src = "/
display dialog \"Hello\" /\
default answer \"World\" /\
buttons {\"Cancel\", \"Hello\", \"World\"} /\
default button \"World\" /\
with icon note /\
giving up after 60";
Uh, well, actually there isn't much more readability in any
case, is there? :)
--
{
Arthur J Knapp, of STELLARViSIONs ;
http://www.STELLARViSIONs.com ;
mailto:email@hidden ;
"... but I could be anyone"
"No you couldn't, sir ..."
}