0
tell application "System Preferences" to activate
delay 0
tell application "System Events"
tell process "System Preferences"
click the menu item "Universal Access" of the menu "View" of menu bar 1
click the radio button "Seeing" of the first tab group of window "Universal Access"
click the checkbox "Use grayscale" of tab group 1 of window "Universal Access"
end tell
end tell
tell application "System Preferences" to quit
我曾經能夠使用上面的Applescript,它會導致屏幕灰度化,直到更新到Maverick。但是它不適用於發生在error "System Events got an error: Can’t get menu item \"Universal Access\" of menu \"View\" of menu bar 1 of process \"System Preferences\"." number -1728 from menu item "Universal Access" of menu "View" of menu bar 1 of process "System Preferences"
的Maverick。有人知道哪些部分需要改變與Maverick合作?轉換AppleScript在Lion上運行良好,但不在Maverick中
謝謝您的很好的程序。它的工作原理應該如此! –