Re: Showing a Package's Contents - SOLVED
Re: Showing a Package's Contents - SOLVED
- Subject: Re: Showing a Package's Contents - SOLVED
- From: Axel Luttgens <email@hidden>
- Date: Fri, 01 Apr 2005 13:09:02 +0200
Martin Orpen wrote:
on 31/3/05 3:39 pm, Axel Luttgens at email@hidden wrote:
In fact, Jonathan's question raised a more general one:
- if a STOCK and/or WELL BEHAVED application's AScripting model doesn't
provide a way to perform a given action, one could try the UI scripting,
- but often, the UI scripting way SEEMS to fail with all those pop-up menus
and those more or less esoteric things
So, I was (and still am) interested to know whether I just don't understand UI
scripting. ;-)
Doh!
You can do it easily with application bundles and vanilla AS:
set foo to choose file
tell application "System Events" to open foo's folder
Amusing (?).
I never noticed it, but it seems that for System Events, those syntaxes
are equivalent:
get <thing> of foo
get <things> of foo
get every <thing> of foo
all returning a list.
Not sure whether this is a good idea or not...
The above, applied to an application bundle with "folder" for "thing",
just returns a single item list of folders ({folder "<path to
foo>:Contents:"}) and opens that folder with the default application
(ie the Finder).
Which is essentialy the same as what we already had with:
tell app "Finder" to open folder "Contents" of <some bundle>
or with a variant:
tell app "Finder" to open some folder of <some bundle>
So, yes, we know vanilla AS may bring us this far.
But. ;-)
How damn is it possible to trigger and access a local menu through UI
scripting?
Axel
|
_______________________________________________
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