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

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -