ObiTobi •->

Anmeldedatum: 13.05.2010 Beiträge: 5
|
Verfasst am: 13.05.2010 - 19:09 Titel: Fenstergröße automatisch napassen |
|
|
Hallo,
bei Mac bin ich erst vor kurzem gelandet und AppleScript stehe ich ganz am Anfang.
Ich möchte gerne, dass die Fenster von Programmen automatisch in der Größe verändert werden und zwar abhängig davon ob an meinem MacBook Pro ein externes Bildschirm angeschlossen ist oder nicht.
Mich nervt ein wenig, dass ich die Fenster immer anpassen muss
Suche im Netz brachte bis jetzt nichts wo ich ansetzen könnte.
Ich benutze Spaces (8 Stück).
Mein erstes ganz simples Anfang wäre:
Code: |
tell the application id "org.mozilla.firefox" to set the bounds of window 0 to {0, 22, 1700, 1430}
tell the application id "org.mozilla.thunderbird" to set the bounds of window 0 to {0, 22, 1900, 1200}
tell the application id "com.apple.iCal" to set the bounds of window 0 to {1220, 22, 2560, 830}
tell the application id "com.apple.AddressBook" to set the bounds of window 0 to {0, 524, 1017, 1440}
tell the application id "com.apple.Safari" to set the bounds of window 0 to {0, 22, 1700, 1430}
tell the application id "com.adiumX.adiumX" to set the bounds of window 0 to {0, 22, 250, 500}
tell the application id "com.skype.skype" to set the bounds of window 0 to {0, 800, 300, 1430} |
An sich funktioniert das erst mal. Es gibt aber Probleme für die ich keine Erklärung, und Ideen wie ich sie lösen kann, habe
Mit diesem Script geht wohl AppleScript zu jedem Programm egal auf welchem Space es läuft und setzt die Größen ein.
Ich starte das Script vom Space 1. Es werden alle Programme angepasst bis auf die, die auf Space 2 laufen. Es ist auch egal was für Programm auf Space 2 läuft.
Starte ich das Script vom Space 2, werden wieder alle Fenster angepasst, bis auf Programme die auf Space 1 laufen.
Gibt es dafür eine Erklärung?
Zweites Problem ist - ich nutze Gimp und Bibble. Beide sind keine nativen OSX Programme Gimp setzt auf X11 und Bibble auf QT.
Wie kriege ich diese Fenster angepasst?
Ja ich weiß, schön ist was anderes. Ich denke aber, für den absoluten Anfang ... besser so als zu Fuß. Für andere/ bessere Vorschläge bin ich sehr Dankbar. _________________ Gruß Tobi |
|