Ich konnte nicht herausfinden, wie es geht, ohne den Namen der Anwendung fest zu codieren, aber ich versuche es so:
alias topleft move screenOriginX;screenOriginY screenSizeX/2;screenSizeY/2 alias topright move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY/2 alias bottomleft move screenOriginX;screenOriginY+screenSizeY/2 screenSizeX/2;screenSizeY/2 alias bottomright move screenOriginX+screenSizeX/2;screenOriginY+screenSizeY/2 screenSizeX/2;screenSizeY/2 layout texteditquadrants 'TextEdit' $ | $ | $ | $ bind 1:ctrl layout texteditquadrants
Wenn Sie nur einen Bildschirm haben, können Sie ein AppleScript wie folgt verwenden:
tell application "Finder" set to bounds of window of desktop end tell tell application "System Events" to tell (process 1 where frontmost is true) set n to number of windows if n > 4 then set n to 4 repeat with i from 1 to n set p to item i of {,, , } set position of window i to p set size of window i to end repeat end tell
Dadurch werden vier neue TextEdit-Fenster erstellt und auf dem Bildschirm angezeigt:
tell application "Finder" set to bounds of window of desktop end tell set ytop to 22 set yhalf to (h - 22) / 2 tell application "TextEdit" close windows repeat with i from 1 to 4 make new document end repeat set bounds of window 1 to set bounds of window 2 to set bounds of window 3 to set bounds of window 4 to end tell