명령 줄에서 QuickTime 녹화를 시작하는 방법은 무엇입니까?


답변:


12

1) AppleScript 편집기로 Applescript를 생성하고 저장합니다 (예 : QTRecord.scpt).

 tell application "QuickTime Player"
     activate
     start (new movie recording)
 end tell

2) 터미널을 열고 명령 행에서 스크립트를 실행하십시오.

 osascript QTRecord.scpt 

또는 하나의 라이너로 전체 :

 osascript -e 'tell application "QuickTime Player" to activate' -e 'tell application "QuickTime Player" to start (new movie recording)'

그 매개 변수를 어떻게 알 수 있습니까? 애플 스크립트 편집기 '레코드'기능, 제공하지 않습니다 ... @ohho
— CodeFarmer

1
@CodeFarmer Xcode를 사용하여 Quicktime Player X 패키지의 Contents 폴더 안에있는 QuickTImePlayerX.sdef를 엽니 다.
— James Bush

2

이 사이트 에 따르면 Applescript를 사용하여 수행 할 수 있습니다

tell application "QuickTime Player"

    set nr to (new movie recording)
    set nr to start recording true
    delay 10
    set nr to stop recording true
end tell

따라서 Quick-time과 상호 작용합니다. QuickTime에는 직접적인 명령이 없습니다.


위의 코드를 컴파일하면 구문 오류가 발생합니다.Expected end of line, etc. but found “true”.
— ohho
당사 사이트를 사용함과 동시에 당사의 쿠키 정책과 개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.