I am very, very new to using AppleScript. I need to enter text into the search box. So far the script looks like this:
on run {input, parameters}
tell application "myApplication" to activate
tell application "System Events"
keystroke "o" using {command down}
end tell
return input
end run
This launches the app and fires the command-o keyboard shortcut to show a file dialog. Now I just need to enter text in:
Best Answer
The trick is figuring out how to address the correct control item in the window. See this hint for an explanation of how to get the needed information: http://hints.macworld.com/article.php?story=20111208191312748
This Applescript code will work on a Finder window named "Titan":
Anyway, the code'll insert "here is some text" into the Finder window's search box. The first 2 lines are comments showing the pieces of the search box. You can probably click on that button too.