Re: A number can't go after this identifier.
Re: A number can't go after this identifier.
- Subject: Re: A number can't go after this identifier.
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 22 Nov 2003 11:10:12 -0800
On 11/22/03 10:43 AM, "Chris Rock" <email@hidden> wrote:
>
>
A simple apple script I would think I would have to do would be:
>
>
tell application finder
>
>
set value of text field 1 of UI element 1 of button "Search" of
>
tool bar 1 of window "Macintosh HD" of application process "Finder" to
>
"<string>"
>
>
end tell
>
>
>
But this apple script will not compile, I am curious why, I am a new
>
user so I am probably screwing something up...
Several things. If it really had to be in a Finder tell block, you'd need
quotes around "Finder". But it doesn't go in a Finder tell block. It goes in
a "System Events" block. First confirm that you have checked "Enable access
for assistive devices" in System Preferences/Universal Access. Then try
this:
tell application "Finder" to activate
tell application "System Events"
set value of text field 1 of UI element 1 of button "Search" of
tool bar 1 of window "Macintosh HD" of application process "Finder" to
"<string>"
end tell
----------------
Or, the format I prefer (it's the same thing):
--------------------
tell application "Finder" to activate
tell application "System Events"
tell process "Finder"
set value of text field 1 of UI element 1 of button "Search" of
tool bar 1 of window "Macintosh HD" of application process "Finder" to
"<string>"
end tell
end tell
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.