Я пытаюсь написать небольшой AppleScript для проекта, где мне нужно:
- Начать запись фильма в формате QuickTime
- минимизировать окно записи
- открыть фильм, который будет отображаться в полноэкранном режиме
- как только фильм закончится, запись должна остановиться
- запись должна сохраниться НА ФОНЕ с именем файла "текущая дата и время"
- закрой фильм, который шел
- открыть сайт в Safari.
Вот что мне удалось сделать до сих пор:
set theDate to current date
set filePath to (path to desktop as text)
tell application "QuickTime Player"
activate
set newMovieRecording to new movie recording
tell newMovieRecording
start
tell application "QuickTime Player"
set miniaturized of window 1 to true
end tell
tell application "QuickTime Player"
open file "Users:test:Desktop:Movie.m4v"
tell document "Movie.m4v" to play
set the bounds of the first window to {0, 0, 1800, 1100} -- I did not find how to put the window in full screen (whatever the screen size is: I wrote this script on an external screen , but the project will take place on the screen of a laptop).
end tell
delay 160 -- the length of the movie
save newMovieRecording in file (filePath) & theDate
stop
close newMovieRecording
tell application "QuickTime Player"
close document "Movie.m4v"
end tell
end tell
end tell
tell application "Safari"
activate
open location "http://stackoverflow.com"
end tell
Приведенный выше сценарий - это все, что я мог понять: когда запись фильма должна быть сохранена, я получаю следующее сообщение от редактора AppleScript: «Ошибка AppleScript - QuickTime Player получил ошибку: неверная форма ключа».
Заранее благодарю за любую помощь.
presentдля воспроизведения фильма в полноэкранном режиме (вместоplay.) - person   schedule 05.11.2013