2016-05-17 5 views
0

AppleScriptを使用してシステム環境設定 - >表示 - >拡大 - >その他のスペースを設定するにはどうすればいいですか?スクリプトシステムの環境設定の表示設定

私が得たまで:

tell application "System Events" 
     tell process "System Preferences" 
      set frontmost to true 
      click button "Displays" of scroll area 1 of window "System Preferences" 
      click radio button "Scaled" of radio group 1 of tab group 1 of window "Built-in Retina Display" 

ではなく、「より多くのスペース」オプションを設定する方法がわから?

TIA

+0

上の画面解像度を変更するための小さなコマンドラインスクリプトを理解しましたか? –

答えて

0

はこれを試してください:あなたはこれを行う方法を

tell application "System Preferences" 
    reveal anchor "displaysDisplayTab" of pane "com.apple.preference.displays" 
end tell 


tell application "System Events" to tell process "System Preferences" to tell window "Built-in Retina Display" 
    click radio button "Display" of tab group 1 
    click radio button "Scaled" of radio group 1 of tab group 1 
    click radio button 4 of radio group 1 of group 2 of tab group 1 
end tell 
quit application "System Preferences" 
0

MacOSのシエラ

#!/usr/bin/osascript 
tell application "System Preferences" 
     reveal anchor "displaysDisplayTab" of pane "com.apple.preference.displays" 
    end tell 

    tell application "System Events" to tell process "System Preferences" to tell window "Built-in Retina Display" 
     click radio button "Display" of first tab group 
     click radio button "Scaled" of first radio group of first tab group 
     tell first radio group of second group of first tab group 
      set isDefault to get value of second radio button 
     end tell 
     if isDefault then 
      click last radio button of first radio group of second group of first tab group 
     else 
      click second radio button of first radio group of second group of first tab group 
     end if 
    end tell 

    tell application "System Preferences" 
     quit 
    end tell