Re: Modifying table cell content via UI scripting
Re: Modifying table cell content via UI scripting
- Subject: Re: Modifying table cell content via UI scripting
- From: Ed Stockly <email@hidden>
- Date: Mon, 1 Dec 2008 16:01:19 -0800
Your script looks fine, but it may be the reference to the the field
that's failing. It's hard to tell without testing it on your app.
I suggest going here:
http://www.prefab.com/uibrowser/
and downloading the trial version of UI Browser. Us that to precisely
identify the field you want to modify.
HTH,
ES
On Dec 1, 2008, at 1:23 PM, Sven A. Schmidt wrote:
Hi,
I've been directed to this list from the pythonmac-sig list after
it turned out that my problem is purely AppleScript related. I'm
hoping someone over here can point out where I'm going wrong. I'm
not very fluent in AppleScript so it's probably something simple
I'm missing.
What I'm trying to do is script a non-scriptable application I
wrote via UI scripting (the "Enable access for assistive devices"
thing in "Universal Access"). More precisely I'm trying to update a
string value in a table cell. The code that I was hoping to do this
with is the following:
tell application "System Events"
tell process "Hourglass"
set value of text field 1 of row 1 of table 1 of scroll area
3 ¬
of splitter group 1 of window "Untitled" to "new string"
end tell
end tell
What I'm expecting is the string in the cell to change to "new
string". What's happening is, well, nothing.
When I double click the cell prior to running the script, thus
making it editable, the string does in fact change. If I click
outside the field afterwards to drop focus, the text changes back
to the previous value, discarding the change.
Apparently the value is not "committed" after editing in this case.
The table view is a CoraData driven NSTableView if that's relevant.
I know I can send a "Return" keystroke to commit the change and in
fact my workaround consists of "typing" the whole thing via
keystrokes in pyappscript. However, I'm curious if there isn't a
better way to do it.
Is there?
Any help, tips, pointers greatly appreciated,
Sven
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40aol.com
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden