Is there a way to get the result of this script to report out as text?
tell application "System Events"
set frontmostProcess to first process where it is frontmost
display dialog frontmostProcess as text
end tell
I’m not sure how to coerce this information into text.
Also, bonus points to anyone who can tell me if there is a way for me to report out which documents the frontmost process has open (this process doesn’t have a an applescript dictionary).
tell application "System Events"
set frontmostProcess to name of application processes whose frontmost is true
end tell
display dialog frontmostProcess
As you may see, it’s not always the name of the document.
In such case a bit of cleaning is required.
You may also see that document of window may fail to return useful infos.
Yvan KOENIG running Sierra 10.12.3 in French (VALLAURIS, France) jeudi 23 mars 2017 11:59:57