2012-07-16 4 views

답변

0

덕분에 나는이 스크립트를 사용하여 작업이있어이 article. 희망이 사람을 미래에 도움이됩니다.

# Detect Displays 
map "<Cmd-Ctrl-d>" do 
    `osascript -e ' 
    tell application "System Preferences" to activate 
    tell application "System Events" 
     tell process "System Preferences" 
     click menu item "Displays" of menu "View" of menu bar 1 
     tell button "Detect Displays" of window 1 to click 
     end tell 
    end tell 
    tell application "System Preferences" to quit 
    '` 
end 
2

당신은 루비에서와 마찬가지로 backticks 나 system()을 사용하여 할 수 있습니다.

예를 들어

: 케빈에

map "<Ctrl-u>" do 
    `osascript -e 'set volume output volume (output volume of (get volume settings) + 7)'` 
end 
+0

강력한 오스카 틴트 힌트를 주셔서 감사합니다. – Adam