명령 줄에서 모든 계정을 모든 Messages.app에서 사용 가능으로 설정하는 방법 계정을 온라인으로 가져올 수

Messages.app에서 모든 계정을 온라인으로 가져올 수 있다고 말 할 수있는 터미널에서 스크립트 가능한 방법이 있습니까?



답변

이 응용 프로그램을 실행하면 모든 계정이 사용 가능 상태가됩니다 :

tell application "System Events"
    tell process "Messages"
        tell menu bar 1
            tell menu bar item "Messages"
                tell menu "Messages"
                    tell menu item "My Status"
                        tell menu "My Status"
                            click menu item "Available"
                        end tell
                    end tell
                end tell
            end tell
        end tell
    end tell
end tell

다음과 같이 저장할 수 있습니다. ~/turn_available.scpt 이 명령으로 터미널에서 실행하십시오.

osascript ~/turn_available.scpt


답변