Finding in the Finder

Is there a way to script the Find feature of the Finder?

I would like to activate the Finder and have to Find dialog box appear, using just one script.


P/S: What I’d really like is to be able to do a Find any where, at any time, without going to the Finder at all. (Sorry Apple).

You could use this script, saved as an application.

[This script was automatically tagged for color coded syntax by Script to Markup Code]

But isn’t doing a " command+f " much easier?

Thanks Greg:
Unfortuantely, when I tried it out I got the following error in ScriptEditor:

‘Expected end of line but found identifier.’



Looks like you just need to eliminate the brakets…

tell application "Finder"
	tell application "System Events" to keystroke "f" with command down
end tell


Thanks for the suggestion but making this adjustment yielded the following error:

“Expected “into”, variable name, class name, other parameter name or property but found application constant or consideration.”



Bill, do you have the GUI scripting software installed? It’s required for the code that’s been offered.

– Rob

Oh no, now I need to make a confession of my ignorance. I don’t even know what the GUI scripting software is.


GUI scripting is included in Panther. Prior to the release of Panther, Jaguar users could download a beta release of System Events (the app that handles GUI scripting). As far as I know, Apple has pulled the beta software. Here’s what Apple has to say about GUI scripting.

– Rob