Re: Photoshop CS2 and GUI Scripting
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