私はiTunesの辞書に認証解除/認可するために任意のプロパティが表示されていないが、私はちょうどGUIスクリプトで遊んと解決策を考え出しました。そのため、ターゲットMacは、以下のスクリプトが動作するようにGUI Scriptingを有効にする必要があります。
tell application "System Events"
tell process "iTunes"
click menu item "Deauthorize This Computer…" of menu 1 of menu bar item "Store" of menu bar 1
delay 1
set frontmost to true
click menu 1 of menu bar item "Store" of menu bar 1
set value of text field 1 of window "Deauthorize This Computer" to "password"
click button "Deauthorize" of window "Deauthorize This Computer"
end tell
end tell
あなたのターゲットMacにAppleSciptを残してから、openコマンドを使って起動することができます。または上記のAppleScriptをコピーしてシェルスクリプトに貼り付け、HEREDOCメソッドをosascriptで使用することもできます。
osascript<<END
tell application "System Events"
tell process "iTunes"
click menu item "Deauthorize This Computer…" of menu 1 of menu bar item "Store" of menu bar 1
delay 1
set frontmost to true
click menu 1 of menu bar item "Store" of menu bar 1
set value of text field 1 of window "Deauthorize This Computer" to "password"
click button "Deauthorize" of window "Deauthorize This Computer"
end tell
end tell
END
上記の方法は、Apple Remote Desktopの者だけでなく、Unixの機能を送るとうまく動作します:
本の完全な例は次のようになります。
また、パスワードはこのスクリプトに含まれていますが、私は を推奨しませんが、権限解除ウィンドウでパスワードが必要であることに注意してください。スクリプトにパスワードを入力した場合は、そのスクリプトを保護して、誰もあなたのアップルのパスワードを知らないようにしてください。
おかげ。素晴らしい答え!私はGUIスクリプティング機能について知らなかった。現在はオンになっていませんが、私のためにパスワードをオンにしてから、別のパスワードを使用して認証解除を実行するようにしてください。 –