I am trying to get all rows from a table of the application.
set ProcName to "AppName"
tell application ProcName to activate
tell application "System Events"
tell process ProcName
tell tab group 1 of window 1
set items to every row of table 1 of scroll area 1
set itemValues to {}
repeat with aRow in items
set itemValue to (value of text field 1 of aRow)
log itemValue
set the end of itemValues to itemValue
end repeat
end tell
end tell
end tell
However when I run the script it prints out only several items because the window title is constantly changing and I get the following error.
"System Events got an error: Can’t get window \"App name window title"
Is it possible to tell the script to use other identifiers other than title? Or please suggest how to solve the issue.
Thank you.
items
as a variable name - that is a reserved word AppleScript uses for reference forms, so you need to change it to something else. – red_menace Sep 15 at 18:21