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: Chris Rock <email@hidden>
- Date: Sat, 22 Nov 2003 10:43:00 -0800
If you want an example, how about entering text into the search field
of a finder window, by accessing it as it's text field. It is easy to
see using PreFab UI Browser what that is called:
Here is the path to element:
application "Finder"
window "Macintosh HD" (1)
toolbar 1
button "Search" (1)
unknown 1
text field 1
Here is what PreFab UI Browser says to do to set that value:
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>"
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...
- Rock
On Nov 22, 2003, at 6:48 AM, Graff wrote:
>
What program are you attempting to script? What are you trying to do?
>
If we know that then we can try it ourselves and work on a solution.
>
>
I'm not sure what the problem is there. One thing that I just found
>
was a program called PreFab UI Browser, it acts like the normal UI
>
Browser but it also will form the System Events statements for you so
>
there is little possibility of error. It's shareware but it has a
>
trial period, you can find it at:
>
<http://www.prefab.com/uibrowser/index.html>
>
>
It looks like a cool application, especially if you are serious about
>
using AppleScript. Maybe using it will help to point out what the
>
problems are with your set value statement.
>
>
- Ken
>
>
On Nov 22, 2003, at 4:15 AM, Chris Rock wrote:
>
>
> I am using UI Browser to locate text fields and the like, and I get
>
> the following:
>
>
>
> The Path to said field:
>
>
>
> application "blah"
>
> window "info" (1)
>
> text field 1
>
>
>
> The Set Value command from this app:
>
>
>
> set value of text field 1 of window "info" of application process
>
> "blah" to "<string>"
>
>
>
> Yet when I try to compile my SIMPLE script I get the following error:
>
>
>
> A number can't go after this identifier.
>
>
>
> No matter how I try, I can't get it to compile, let along being able
>
> to write anything into this field, nor can I read from it, as I keep
>
> getting the same Syntax Error all nite.
>
_______________________________________________
>
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.
_______________________________________________
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.