You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use AppleScript version "2.4" -- Yosemite (10.10) or lateruse scripting additions-- 隐藏tell application "System Events" to key code 4 using {option down, command down}-- 隐藏桌面图标do shell script "chflags -h hidden ~/Desktop/*"-- 自动隐藏和显示菜单栏tell application "System Preferences" to reveal the ¬ anchor named "main" of ¬ pane id "com.apple.preference.general"tell application "System Events" to tell ¬ process "System Preferences" to tell ¬ window "通用" to tell ¬ checkbox "自动隐藏和显示菜单栏" to ¬ perform action "AXPress"quit application "System Preferences"-- 开始录屏tell application "QuickTime Player" to activate (start (new screen recording))tell application "System Events" if application "QuickTime Player" is not (activate) then -- 显示桌面图标 do shell script "chflags -h nohidden ~/Desktop/*" -- 自动隐藏和显示菜单栏 tell application "System Preferences" to reveal the ¬ anchor named "main" of ¬ pane id "com.apple.preference.general" tell application "System Events" to tell ¬ process "System Preferences" to tell ¬ window "通用" to tell ¬ checkbox "自动隐藏和显示菜单栏" to ¬ perform action "AXPress" quit application "System Preferences" else return end ifend tell