Date: Sat, 27 Mar 2010 18:45:56 +0100
Subject: Re: Show me in the Finder
Content-Type: text/plain; charset=WINDOWS-1252; format=flowed;
It seems you have responded to the french mailing list to a thread
started in the english one (still, writing in french).
No, I send a direct answer to you. I am no more in the French list (I
was removed by the French RS) and I never go back.
Anyway, I already know your point: the ?activate? appleevent ?may?
take an additional parameter, however, and that is my point, this
parameter is clearly optional! The ?activate? command is system-wide
you don't say ?Tell Application ?Finder? to activate application
"Mail"?, and it wouldn't make sense, for this command, to provide a
parameter of type ?file? (especially to just bring an app to the front).
That activate command (with a parameter) came from the Finder.
dim a as AppleEvent = NewAppleEvent("misc", "slct", "MACS")
a = NewAppleEvent("misc", "actv", "MACS")
"MACS" is the creator type of the Finder application.
IMHO: the translation can be
'use the select function from the miscellaneous set of commands of the
'use the activate function from the miscellaneous set of commands of the
I haven't checked it yet, but I guess the Finder has its own
?Activate? command. Where have you looked at the ?Activate? command
you mention in your answer (BTW)?
Run the AppleScript Editor, in the File menu select Open a dictionary
and choose Finder. Then search activate and you are done. That is why I
talked about _two_ activate commands! The one I use came from the Finder.
I still don't understand why it hasn't worked for you. It has worked
for others in this list (including me), so it seems to be something
happening to your side.
It worked for me only if I pass a FolderItem:
It opens the FolderItem.Parent and select (highlight) the passed FolderItem…
NOTA: the example project I use ask for a Directory and fills a ListBox
with its contents (troubles can appears if the Directory is empty).
Then, a Control-Click (right-click) in an entry of the ListBox let me
choose the "Show me in the Finder" item.
I just read the old digests and I discover potential troubles. Because I
do not have yet integrated the shared code, I cannot talk any further
about how it works for me. In my target project, the object to "Show in
the Finder" is a Directory, so I may not have troubles with non
Directories items… I do not know. All I want to do is let the user see
the ListBox selected entry in the Finder. (s)he can do what (s)he want
starting from there (in a > 800 directories / ListBox entries).
Of course, I can be wrong (but as far as I can see, if it works the way
MacBook 2.4GHz, UniBody, 2008-11
MacOS X 10.6.2 [now 10.6.3]
But I have a ton of troubles when I use the Finder (and some in the
J'ai levé un lièvre...
Unsubscribe or switch delivery mode:
Search the archives: