• 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: Photoshop CS2 and GUI Scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Photoshop CS2 and GUI Scripting


  • Subject: Re: Photoshop CS2 and GUI Scripting
  • From: kai <email@hidden>
  • Date: Mon, 22 May 2006 23:27:46 +0100


On 22 May 2006, at 21:35, Bill Cheeseman wrote:

There's a story behind this.

Thanks, Bill, for fleshing out some of the background details to this. Most enlightening, as ever.


The System Events dictionary describes them differently,
and I have no idea whether the difference has any practical impact:

'name' - the name of the UI Element, which identifies it within its
container

'title' - the title of the UI element as it appears on the screen

If someone could explain the technical difference to me, I would appreciate
it. Perhaps it has to do with localization. I'm not familiar enough with the
use of AppleScript under other language systems to know whether AppleScript
needs menu names in localized form, or whether the localized name is useful
for generating dialog text in localized form.

FWIW, I've just run through a whole series of direct comparisons between names and titles, using various different localizations. The localized versions are reflected by both 'name' and 'title'. In fact, in every case, the only difference I've noticed between the two properties relates to menu item separators. These are returned by 'title' as an empty string (actually Unicode text), while 'name' lists them as 'missing value'. (This means, of course, that any attempt to set a variable to the name of an individual menu item separator will result in that variable being undefined.) Apart from this rather minor detail, the distinction (in any implementation I've explored so far) continues to escape me.


What was wrong with the OP's script? It works perfectly well for me now,
using either 'name' or 'title'. It didn't work at first. Then I made one
change, and it started working:


I added a statement at the beginning to 'activate application "Adobe
Photoshop CS2.app"'. I don't know whether it was the 'activate' part or the
"app" name extension that made the difference. Of course, the "app" name
extension disappeared as soon as I compiled the script, but I guess it's
there invisibly, anyway.

Excellent. Hopefully, that will give Irwin the break he was looking for.

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Photoshop CS2 and GUI Scripting (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: URL Access Redux
  • Next by Date: To shell or not to shell (was Re: URL Access Redux)
  • Previous by thread: Re: Photoshop CS2 and GUI Scripting
  • Next by thread: Roman Numbers
  • Index(es):
    • Date
    • Thread