• 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: "a reference to"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "a reference to"


  • Subject: Re: "a reference to"
  • From: Luther Fuller <email@hidden>
  • Date: Sat, 19 Jan 2008 06:52:48 -0600

On Jan 19, 2008, at 4:45 AM, Brennan wrote:
On 16/01/08 at 9:55, Christopher Nebel <email@hidden> wrote:
	tell app "Finder" to set scrWd to item 3 of (bounds of window of
desktop)

Parentheses in an object specifier affect grouping (this can be useful
when you've got more than one "whose" clause)

I can only urge you all to follow this advice. Inserting 'get' all over
the place is kinda ugly, no?


Ever since I learned a little LISP, I usually put parentheses around
expressions in AppleScript, especially those which contain spaces.

As a result I almost never have problems with a missing 'get'. If it does
happen, it can almost always be resolved with adding more carefully placed
parentheses, such as;


set dr to (display dialog (name of (info for (choose file))))

I agree, and do that often, but it does not always work. Recall my earlier remark ...


I wrote ...

	set scrWd to (item 3 of (bounds of window of desktop))

and got: "Finder got an error: Can't get item 3 of bounds of window of desktop."

But, then I wrote ...

	set scrWd to (item 3 of (get bounds of window of desktop))

which works, too, and gets me back to a one-liner.

Why did I have to use 'get' ?


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: "a reference to" (From: Brennan <email@hidden>)

  • Prev by Date: Re: Plist entry
  • Next by Date: Re: Plist entry
  • Previous by thread: Re: "a reference to"
  • Next by thread: Re: "a reference to"
  • Index(es):
    • Date
    • Thread