I want to get the value of a button from an internal tool.
tell application "System Events" to tell process "App"
set myNumberIs to get value of radio group 1 of group 1 of splitter ¬
group 1 of window "my app" of application process "my app process"
end tell
return:
radio button " (1)" of radio group 1 of group 1 of splitter group 1 of ¬
window "my app"
How can I save the 1
as a value?
I tried text trimming but that didn't work. Also tried to do something like this:
if myNumberIs contains " (1)" then set myNumberIsAsInteger to 1
but then I get an error:
System Events got an error: Can’t get result of radio button \...
tell application
block is not closed. Can you paste the rest of the code ? Right now, I'm confused how thevalue
of aradio group
object can return aradio button
object. This implies to me that either the code is incomplete, or I'm too tired to compute what's actually happening.