• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Illustrator scripting syntax
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Date anomaly
  • Next by Date: Re: scripting mail to select mailboxes
  • Previous by thread: Re: Illustrator scripting syntax
  • Next by thread: reboot into OS 9
  • Index(es):
    • Date
    • Thread