Re: Applet's last command doesn't take
Re: Applet's last command doesn't take
- Subject: Re: Applet's last command doesn't take
- From: Richard 23 <email@hidden>
- Date: Mon, 26 Feb 2001 07:21:33 -0800
Cal opined:
>
Yes. The more English-like version of the name reference form in
>
AppleScript is to insert the word "named":
>
Yes. The more English-like version of the name reference form in
>
AppleScript is to insert the word "named":
>
>
tell the application named "Finder"
>
count the files in the folder named "My folder" in the disk named "My
>
Disk"
>
end tell
Unfortunately running into the 32k limit many times has conditioned
me to using a Hemingway style of scripting rather than the English-
like style.
And then there's that automatic wrap that occurs as you can see above!
When I hit the wall, here's what happens, against my wishes, to my script:
1. First goes the commented out sections useful for testing/debugging.
(to a separate file if I think I may need them later).
2. Next goes any helpful general information in my header.
3. Snip goes any elaboration in the comment before each handler.
I always put a one-liner wrapped in horizontal rules (dashes)
before every handler, unless the limit forces me to snip.
4. Ouch goes the entirety of my header.
5. Slice goes the entirety of the comment before each handler.
6. Rip go any remaining niceties like descriptive variable names.
7. Propellorhead techniques beyond the scope of this email.
Whoops where did the step to remove English style statements in my
AppleScripts? Unfortunately it was conditioned out of me long ago.
Nothing against what Cal has said here. I agree that human-styled
prose as well as copious commenting (my wording!) are desirable in
AppleScripts especially if they may end up being maintained by others.
But that text limit is a bugger. I can do a lot with a little but some
types of projects require more and then the limit can be very frustrating.
R23
... the best part wound up on the cutting room floor ...