Reputation: 63
I am very new to apple script, I am trying to get all the UIElements, here is my code
tell application "Myapp"
set visible to true
return every UI element of front window
return name of every UI element of front window
end tell
I got this code from here can anyone please help me to get out of this Note: My OS is OS X El Capitan 10.11.1
Upvotes: 3
Views: 2229
Reputation: 285082
You have to ask the process of the app – which System Events knows – for that information.
tell application "System Events"
tell process "Myapp"
set visible to true
return every UI element of front window
-- return name of every UI element of front window
end tell
end tell
The name of the process can be different from the name of the application
Upvotes: 3