특정 응용 프로그램 창에서 바로 가기 또는 메뉴 작업을 실행합니다
문제
은 실제로 모든 Xcode 열린 프로젝트 (응용 프로그램 창)를 실제로 이동하고 메뉴 조치 제품을 실행하거나 바로 가기 "Cmd +."를 실행하거나 실행하는 메뉴 작업을 실행합니다.
해결책
xcode 에서 Apple 스크립트를 실행하려면 각 실행의 시작 부분에서 다음과 같이 쉘 스크립트를 만들 수 있습니다.
#!/bin/bash
osascript -e 'tell application "Xcode"
activate
set activeWindow to window 1
set windowName to name of activeWindow
repeat with aWindow in windows
tell application "System Events" to keystroke "`" using command down
if name of aWindow is not equal to windowName then
if name of aWindow is not equal to "" then
tell application "System Events" to keystroke "." using command down
end if
end if
end repeat
end tell'
.
그런 다음 xcode 환경 설정 -> 행동 -> 시작 -> 스크립트를 선택하고 스크립트를 선택하십시오.
제휴하지 않습니다 StackOverflow