Nice work, kel1, this is something to work with, for sure, but as you noted not quite what I had in mind.
and MCusrII this script doesn’t work, I always get “System Events got an error: Can’t set application process “QUICKTIME” to {1920, 480}.” which is basically the same error I get for anything. Doesn’t matter the size, if it’s the actual window size etc.
To give every one an idea of what I’m doing already, here is the entire quicktime section of the script. It’s very long so sorry about that, and there is definitely some stuff I could make a little cleaner (play and loop) but thats easy to come back and re work (though any advice is good)
This is actually from several sections of the script amalgamated, there are another few hundred lines in there for dealing with things like system info sniffing and more.
as you can see everything plays and tiles fine, I just want to be able to toss it in a loop of playing from the tiled view to all full screened and then back.
The fullscreening and un fullscreening isn’t part of this script
[side note, if you’re looking for test quicktime files I recommend trailers.apple.com]
-- variables
tell application "Finder"
set scr_size to bounds of window of desktop
set scr_width to item 3 of scr_size
set scr_height to item 4 of scr_size
end tell
set Compensation_A to 11
set Compensation_B to 14
set Compensation_C to 7
set DP to ((path to desktop folder) & "vidstress") as string
tell application "Finder"
open (every file of folder DP)
end tell
delay 10
--arange all windows
set volume with output muted
tell application "QuickTime Player"
set open_windows to (every window where visible is true)
set n to count of open_windows
-- Next we play all windows
try
play document 1
play document 2
play document 3
play document 4
play document 5
play document 6
play document 7
play document 8
play document 9
play document 10
play document 11
play document 12
end try
-- next we loop
try
set the looping of document 1 to true
set the looping of document 2 to true
set the looping of document 3 to true
set the looping of document 4 to true
set the looping of document 5 to true
set the looping of document 6 to true
set the looping of document 7 to true
set the looping of document 8 to true
set the looping of document 9 to true
set the looping of document 10 to true
set the looping of document 11 to true
set the looping of document 12 to true
end try
if n = 1 then
tell application "QuickTime Player"
activate
tell window 1
set bounds to {0, 0, scr_width, scr_height}
end tell
end tell
end if
if n = 2 then
tell application "QuickTime Player"
activate
tell window 1
set bounds to {0, 0, scr_width / 2, scr_height}
end tell
activate
tell window 2
set bounds to {scr_width / 2, 0, scr_width, scr_height}
end tell
end tell
end if
if n = 3 then
tell application "QuickTime Player"
activate
tell window 1
set bounds to {0, 0, scr_width / 2, scr_height}
end tell
activate
tell window 2
set bounds to {((scr_width / 4) * 2), 0, scr_width, (scr_height / 2) - Compensation_A}
end tell
activate
tell window 3
set bounds to {((scr_width / 4) * 2), (scr_height / 2) + Compensation_A, scr_width, scr_height}
end tell
end tell
end if
if n = 4 then
tell application "QuickTime Player"
activate
tell window 1
set bounds to {0, 0, ((scr_width / 4) * 2), (scr_height / 2) - Compensation_A}
end tell
activate
tell window 2
set bounds to {((scr_width / 4) * 2), 0, scr_width, (scr_height / 2) - Compensation_A}
end tell
activate
tell window 3
set bounds to {0, (scr_height / 2) + Compensation_A, ((scr_width / 4) * 2), scr_height}
end tell
activate
tell window 4
set bounds to {((scr_width / 4) * 2), (scr_height / 2) + Compensation_A, scr_width, scr_height}
end tell
end tell
end if
if n = 5 then
tell application "QuickTime Player"
activate
tell window 1
set bounds to {0, 0, ((scr_width / 4) * 2), (scr_height / 2) - Compensation_A}
end tell
activate
tell window 2
set bounds to {0, (scr_height / 2) + Compensation_A, ((scr_width / 4) * 2), scr_height}
end tell
activate
tell window 3
set bounds to {((scr_width / 4) * 2), 0, scr_width, (scr_height / 3) - Compensation_C}
end tell
activate
tell window 4
set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 5
set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
end tell
end tell
end if
if n = 6 then
tell application "QuickTime Player"
activate
tell window 1
set bounds to {0, 0, ((scr_width / 4) * 2), (scr_height / 3) - Compensation_C}
end tell
activate
tell window 3
set bounds to {0, (scr_height / 3) + Compensation_B, ((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 5
set bounds to {0, ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 2), scr_height}
end tell
activate
tell window 2
set bounds to {((scr_width / 4) * 2), 0, scr_width, (scr_height / 3) - Compensation_C}
end tell
activate
tell window 4
set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 6
set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
end tell
end tell
end if
if n = 7 then
tell application "QuickTime Player"
activate
activate
tell window 1
set bounds to {0, 0, (scr_width / 3), (scr_height / 2) - Compensation_A}
end tell
activate
tell window 2
set bounds to {(scr_width / 3), 0, ((scr_width / 3) * 2), (scr_height / 2) - Compensation_A}
end tell
activate
tell window 3
set bounds to {0, (scr_height / 2) + Compensation_A, (scr_width / 3), scr_height}
end tell
activate
tell window 4
set bounds to {(scr_width / 3), (scr_height / 2) + Compensation_A, ((scr_width / 3) * 2), scr_height}
end tell
activate
tell window 5
set bounds to {((scr_width / 3) * 2), 0, scr_width, (scr_height / 3) - Compensation_C}
end tell
activate
tell window 6
set bounds to {((scr_width / 3) * 2), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 7
set bounds to {((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
end tell
end tell
end if
if n = 8 then
tell application "QuickTime Player"
activate
activate
tell window 1
set bounds to {0, 0, (scr_width / 3), (scr_height / 2) - Compensation_A}
end tell
activate
tell window 2
set bounds to {0, (scr_height / 2) + Compensation_A, (scr_width / 3), scr_height}
end tell
activate
tell window 3
set bounds to {(scr_width / 3), 0, ((scr_width / 3) * 2), (scr_height / 3) - Compensation_C}
end tell
activate
tell window 4
set bounds to {(scr_width / 3), (scr_height / 3) + Compensation_B, ((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 5
set bounds to {(scr_width / 3), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 3) * 2), scr_height}
end tell
activate
tell window 6
set bounds to {((scr_width / 3) * 2), 0, scr_width, (scr_height / 3) - Compensation_C}
end tell
activate
tell window 7
set bounds to {((scr_width / 3) * 2), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 8
set bounds to {((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
end tell
end tell
end if
if n = 9 then
tell application "QuickTime Player"
activate
activate
tell window 1
set bounds to {0, 0, (scr_width / 3), (scr_height / 3) - Compensation_C}
end tell
activate
tell window 2
set bounds to {0, (scr_height / 3) + Compensation_B, (scr_width / 3), ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 3
set bounds to {0, ((scr_height / 3) * 2) + Compensation_C, (scr_width / 3), scr_height}
end tell
activate
tell window 4
set bounds to {(scr_width / 3), 0, ((scr_width / 3) * 2), (scr_height / 3) - Compensation_C}
end tell
activate
tell window 5
set bounds to {(scr_width / 3), (scr_height / 3) + Compensation_B, ((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 6
set bounds to {(scr_width / 3), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 3) * 2), scr_height}
end tell
activate
tell window 7
set bounds to {((scr_width / 3) * 2), 0, scr_width, (scr_height / 3) - Compensation_C}
end tell
activate
tell window 8
set bounds to {((scr_width / 3) * 2), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 9
set bounds to {((scr_width / 3) * 2), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
end tell
end tell
end if
if n = 10 then
tell application "QuickTime Player"
activate
activate
tell window 1
set bounds to {0, 0, (scr_width / 4), (scr_height / 2) - Compensation_A}
end tell
activate
tell window 2
set bounds to {(scr_width / 4), 0, ((scr_width / 4) * 2), (scr_height / 2) - Compensation_A}
end tell
activate
tell window 3
set bounds to {0, (scr_height / 2) + Compensation_A, (scr_width / 4), scr_height}
end tell
activate
tell window 4
set bounds to {(scr_width / 4), (scr_height / 2) + Compensation_A, ((scr_width / 4) * 2), scr_height}
end tell
activate
tell window 5
set bounds to {((scr_width / 4) * 2), 0, ((scr_width / 4) * 3), (scr_height / 3) - Compensation_C}
end tell
activate
tell window 6
set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_B, ((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 7
set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 3), scr_height}
end tell
activate
tell window 8
set bounds to {((scr_width / 4) * 3), 0, scr_width, (scr_height / 3) - Compensation_C}
end tell
activate
tell window 9
set bounds to {((scr_width / 4) * 3), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 10
set bounds to {((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
end tell
end tell
end if
if n = 11 then
tell application "QuickTime Player"
activate
activate
tell window 1
set bounds to {0, 0, ((scr_width / 4) * 2), (scr_height / 3) - Compensation_C}
end tell
activate
tell window 2
set bounds to {0, (scr_height / 3) + Compensation_B, (scr_width / 4), ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 3
set bounds to {0, ((scr_height / 3) * 2) + Compensation_C, (scr_width / 4), scr_height}
end tell
activate
tell window 4
set bounds to {(scr_width / 4), (scr_height / 3) + Compensation_B, ((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 5
set bounds to {(scr_width / 4), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 2), scr_height}
end tell
activate
tell window 6
set bounds to {((scr_width / 4) * 2), 0, ((scr_width / 4) * 3), (scr_height / 3) - Compensation_C}
end tell
activate
tell window 7
set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_B, ((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 8
set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 3), scr_height}
end tell
activate
tell window 9
set bounds to {((scr_width / 4) * 3), 0, scr_width, (scr_height / 3) - Compensation_C}
end tell
activate
tell window 10
set bounds to {((scr_width / 4) * 3), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 11
set bounds to {((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
end tell
end tell
end if
if n = 12 then
tell application "QuickTime Player"
activate
activate
tell window 1
set bounds to {0, 0, (scr_width / 4), (scr_height / 3) - Compensation_C}
end tell
activate
tell window 2
set bounds to {0, (scr_height / 3) + Compensation_B, (scr_width / 4), ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 3
set bounds to {0, ((scr_height / 3) * 2) + Compensation_C, (scr_width / 4), scr_height}
end tell
activate
tell window 4
set bounds to {(scr_width / 4), 0, ((scr_width / 4) * 2), (scr_height / 3) - Compensation_C}
end tell
activate
tell window 5
set bounds to {(scr_width / 4), (scr_height / 3) + Compensation_B, ((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 6
set bounds to {(scr_width / 4), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 2), scr_height}
end tell
activate
tell window 7
set bounds to {((scr_width / 4) * 2), 0, ((scr_width / 4) * 3), (scr_height / 3) - Compensation_C}
end tell
activate
tell window 8
set bounds to {((scr_width / 4) * 2), (scr_height / 3) + Compensation_B, ((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 9
set bounds to {((scr_width / 4) * 2), ((scr_height / 3) * 2) + Compensation_C, ((scr_width / 4) * 3), scr_height}
end tell
activate
tell window 10
set bounds to {((scr_width / 4) * 3), 0, scr_width, (scr_height / 3) - Compensation_C}
end tell
activate
tell window 11
set bounds to {((scr_width / 4) * 3), (scr_height / 3) + Compensation_B, scr_width, ((scr_height / 3) * 2) + Compensation_C}
end tell
activate
tell window 12
set bounds to {((scr_width / 4) * 3), ((scr_height / 3) * 2) + Compensation_C, scr_width, scr_height}
end tell
end tell
end if
--end arangment
end tell
Model: MBPr 15"
AppleScript: 2.5.1
Browser: Safari 537.31
Operating System: Mac OS X (10.8)