AppleScript: Monitore synchronisieren aktivieren per Skript

Ist zwar übelstes GUI-Skripting, mag aber dem ein oder anderen helfen...
Code zum markieren einmal anklicken Code im Skript-Editor öffnen

do shell script "open /System/Library/PreferencePanes/Displays.prefPane"

delay 2 --wenn Dein Rechner da langsamer ist... größerer Delay... I love GUI-Scripting

activate application "System Preferences"

tell application "System Events"

tell process "System Preferences"

if title of radio button 2 of tab group 1 of window 1 = "Anordnen" then

click radio button "Anordnen" of tab group 1 of window 1

click checkbox 1 of group 1 of tab group 1 of window 1

else

display dialog "Falsche Sprache oder kein 2. Monitor"

end if

end tell

end tell

tell application "System Preferences" to quit

Übrigens ein geniales Tool für GUI-Skripting ist der UI-Browser, wenngleich ich die 55$ für ein solches Tool einfach nur überzogen finde!
This entry was posted in OS X and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA:


3 + five =

Subscribe without commenting

  • Seite übersetzen:


    Paypal for Pizza:




  • Kategorien


  • Letzte Kommentare

    • Niklas: Vielen Vielen Dank! So klappt es!
    • hubi: Servus Niklas, ich habe mir den Quellcode noch einmal angesehen und habe nun unter 10.7.3 einen Weg gefunden...
    • Niklas: Klingt super das Script. Leider bekomm ich immer folgende Fehlermeldung: error “„Mail“ hat einen Fehler...
    • Jürgen: Hallo Hubi, beim Abfragen von Kennworten gibt es noch eine böse Falle: Das Format, in dem security antwortet,...
    • hubi: Am einfachsten Du öffnest im AppleScript-Editor mal das Funktionsverzeichnis (unter Ablage) von iTunes. Ein...