Re: Illustrator scripting syntax
Re: Illustrator scripting syntax
- Subject: Re: Illustrator scripting syntax
- From: has <email@hidden>
- Date: Thu, 13 Mar 2003 03:42:33 +0000
Preston Smith wrote:
Does anyone know why Illustrator uses the convention of;
Not an Illustrator issue. Rather, a matter of personal coding
style... and how easiest to get the object reference returned by the
make command into a variable for later use.
"set MyDocument to make document" etc
The "set something to do something" isn't intuitive to me. It looks to me
as if I'm making a variable to create the document.
Yeah. Well, it works, but you're not the only one who finds it
awkward to read. I prefer AppleScript's alternate 'set' syntax when
the returned value is of secondary importance to the command itself:
make new document returning docRef
Functionally the same as 'set docRef to make new document', but much
nicer to look at. And neater and more robust than the not uncommon
but rather klunky:
make new document
set docRef to result
HTH
has
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.