Use automator to launch a keystroke when program is idle

automator

Can I use automator to launch a keystroke (cmd+R) when program PremierePro CS6 is idle for 1 minute. This keystroke would start program to Render videofiles.
Many Thanks, Jan.

Best Answer

I don't know how well it would work, but you could try running something like this in AppleScript Editor.

repeat
    tell application "System Events" to tell process "Safari"
        set p to properties of UI elements of UI elements
        delay 10
        if properties of UI elements of UI elements is p then
            set frontmost to true
            keystroke "r" using command down
            --return
            delay 20
        end if
    end tell
end repeat