這AppleScript的將 「打開黑幕關」
tell application "System Events"
try
click menu item "Turn Shady Off" of menu 1 of menu bar item "Shade" of menu bar 1 of application process "Shady"
click menu bar item 1 of menu bar 2 of application process "Shady"
end try
end tell
這AppleScript的將 「打開黑幕論」
tell application "System Events"
try
click menu item "Turn Shady On" of menu 1 of menu bar item "Shade" of menu bar 1 of application process "Shady"
click menu bar item 1 of menu bar 2 of application process "Shady"
end try
end tell
假設它是在狀態欄中正在運行。
這將打開和關閉
on toggle()
tell application "System Events"
try
click menu item "Turn Shady On" of menu 1 of menu bar item "Shade" of menu bar 1 of application process "Shady"
end try
try
click menu item "Turn Shady off" of menu 1 of menu bar item "Shade" of menu bar 1 of application process "Shady"
end try
click menu bar item 1 of menu bar 2 of application process "Shady"
end tell
end toggle
toggle()
保存它作爲一個應用程序在ScriptEditor或在Automator的服務或任何你選擇。不需要FastScripts。
這真的太棒了。非常感謝通過屏幕截圖的詳細說明! – ylluminate