Trying to find out why I would get and error and a resolution if possible. If I run in Script Editor it will work but I have to remove the set variable part, it doesn’t matter the application:
tell application "System Events" set frontApp to name of first application process whose frontmost is true end tell tell application "System Events" set frontWindow to the title of window 1 of application process frontApp end tell try tell application "System Events" get entire contents of window frontWindow of application process frontApp end tell end try tell application "Keyboard Maestro Engine" setvariable "theContents" to the result end tell
I have also tried using an AppleScript Action in KM and saving to a variable but that seems to slow down my KM at most times. I am also an AppleScript n00b so that could part of the issue. Thanks!