Determining when QuickTime stops recording using AppleScript -
i'm using following applescript determine when user clicks stop recording button in task bar:
tell application "quicktime player" tell document 1 activate new screen recording delay 1 tell application "system events" key code 49 delay 2 repeat until (new screen recording) false end repeat end tell end tell though instead script keeps relaunching quicktime.
you can put result of new screen recording command variable.
use exists command check document
tell application "quicktime player" activate set tdoc new screen recording --> document "screen recording" delay 1 tell application "system events" key code 49 delay 2 repeat while exists tdoc delay 1 end repeat -- recording stopped tell front document -- front document ("untitled") end tell end tell
Comments
Post a Comment