Reputation: 1613
I'd like to click a checkbox that changes name (it's called either "checkbox 3" or "checkbox 4", so I can't rely on its name).
I've tried with something like this:
tell application "System Events" to tell process "Aycons"
set theCheckbox to checkbox "checkbox 3" of window 1
tell theCheckbox
if not (its value as boolean) then click theCheckbox
end tell
end tell
Unfortunately it doesn't fit my needs.
This are the attributes of the checkbox, any thoughts on how can I click it?
Upvotes: 0
Views: 50
Reputation: 3292
Reference as an index instead, it should not change but may not be in obvious linear order.
eg,
set theCheckbox to checkbox 2 of window 1
Upvotes: 2