Keymando를 통해 "디스플레이 감지"를 강제로 수행 할 수 있어야합니다. 시스템 명령을 실행하는 방법에 대한 예제가 없습니다. 이 작업을 수행하는 방법에 대한 의견이 있으십니까?keymando에서 시스템 명령어를 실행하는 방법
0
A
답변
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
강력한 오스카 틴트 힌트를 주셔서 감사합니다. – Adam