Created
August 14, 2018 14:11
-
-
Save drewdiver/c70330a5162f5c137e62f9bdb594468e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set processName to text returned of ¬ | |
(display dialog ¬ | |
"Enter process name" default answer ¬ | |
"Preview" buttons {"OK", "Cancel"} default button 1) | |
tell application "System Events" | |
if exists (window 1 of process processName) then | |
tell process processName | |
set visible to true | |
return every UI element of front window | |
return name of every UI element of front window | |
end tell | |
else | |
display dialog "Process \"" & processName & "\" not found! Is the application running?" | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment