AppleScript 相关,还有部分 shell scripts。
[TOC]
Introduction to AppleScript Language Guide
details
activate application "QuickTime Player"
tell application "System Events"
tell process "QuickTime Player"
set frontmost to true
# 选择菜单栏上的文件「菜单」中的「新建屏幕录制」
click menu item "新建屏幕录制" of menu "文件" of menu bar 1
# 等待「屏幕录制」窗口出现
repeat until exists window "屏幕录制"
end repeat
# 按下空格键
tell application "System Events" to keystroke " "
end tell
end tell