Я знаю, что, вероятно, очень простой ответ на этот вопрос. Я пытаюсь настроить приложение Applescript, которое при активации запускает quicktime, открывает новую видеозапись, устанавливает камеру и звук, запускает запись, а затем завершает запись и сохраняет ее через 30 секунд.Установите камеру в quicktime с помощью applescript
В настоящее время у меня есть сценарий, который делает все, кроме настройки камеры и источника звука. Любые советы о том, как выбрать определенную камеру и источник звука с помощью applescript?
Спасибо!
Вот код, как она стоит сейчас ..
--Set some Variables
--Max length of recording
set maxrec to 20 --in seconds
--Ending Message
set EndMsg to "Thank you for participating in this project. Your video has been recorded."
--Begin Loop
repeat
--Get the person's name
repeat
display dialog "What's your name?" default answer ""
set theName to (text returned of result)
if theName ≠ "" then exit repeat
end repeat
--Set the date
set theDate to current date
set y to text -4 thru -1 of ("0000" & (year of theDate))
set m to text -2 thru -1 of ("00" & ((month of theDate) as integer))
set d to text -2 thru -1 of ("00" & (day of theDate))
set h to text -2 thru -1 of ("00" & (hours of theDate))
set mm to text -2 thru -1 of ("00" & (minutes of theDate))
set dateStamp to (y & "-" & m & "-" & d & " " & h & mm as string)
--Create a folder for the person
tell application "Finder"
set p to path to movies folder from user domain
try
make new folder at p with properties {name:"Video Clips"}
end try
set p to (path to movies folder from user domain as text) & "Video Clips:"
make new folder at p with properties {name:dateStamp & " " & theName}
set thePath to result
--Establish the final name of the movie
set fileName to ((thePath as text) & dateStamp & ".mov" as string)
end tell
--Open New Recording, start and stop it
tell application "QuickTime Player"
set newMovieRecording to new movie recording
set windowID to id of first window whose name = "Movie Recording"
delay 2
tell newMovieRecording
--Set Camera to Blackmagic
set current camera of newMovieRecording to Blackmagic of video recording devices
start
end tell
set theSeconds to maxrec
repeat theSeconds times
display dialog theSeconds buttons {} giving up after 1 with title "REMAINING TIME"
set theSeconds to (theSeconds - 1)
end repeat
tell newMovieRecording
stop
end tell
--save and close the recording
set newMovieRecordingDoc to first document whose name = (get name of first window whose id = windowID)
tell newMovieRecordingDoc to save in fileName
set SavedRecordingDoc to first document whose name = (get name of first window whose id = windowID)
tell SavedRecordingDoc to close
quit
end tell
--Display "Thank You" Message
tell application "System Events" to set frontmost of process "Video Booth" to true
display dialog EndMsg giving up after 20 buttons {"Continue…"} ¬
default button 1
end repeat
Здесь ошибка я получаю сейчас, когда я запускаю его.
Ошибка «QuickTime Player получил сообщение об ошибке: Невозможно сделать Blackmagic каждого записывающего устройства документа« Запись видео »в спецификатор типа». номер -1700 от Blackmagic каждого устройства видеозаписи документа «Запись видео» в спецификатор
Я заинтригован этой линии: установить текущую камеру newMovieRecording к Blackmagic из устройства видеозаписи Где находится "Blackmagic"? Я попытался заменить это на строку, содержащую имя моего iPhone, и получил «Доступ не разрешен». –