Presenting multiple quicktime videos at once

Hi zndr,

If you still want a script to calculate the bounds, here’s one I just wrote:


-- get screen bounds
tell application "Finder"
	set b to bounds of window of desktop
end tell
set {xsize, ysize} to {item 3, item 4} of b
-- get increment values
set x to xsize div 4
set y to ysize div 3
set the_bounds to {}
-- init y values
set y1 to 0
set y2 to y
repeat 3 times
	-- init x values
	set x1 to 0
	set x2 to x
	repeat 4 times
		set end of the_bounds to {x1, y1, x2, y2}
		set x1 to x1 + x
		set x2 to x2 + x
	end repeat
	-- increment y values
	set y1 to y1 + y
	set y2 to y2 + y
end repeat

set f to choose folder
tell application "Finder"
	set file_list to (every file of f) as alias list
end tell
set n to count file_list

tell application "QuickTime Player"
	activate
	set doc_list to {}
	repeat with i from 1 to n
		set this_file to item i of file_list
		set this_doc to (open this_file)
		set end of doc_list to this_doc
		set this_bounds to item i of the_bounds
		set bounds of front window to this_bounds
		tell this_doc
			set looping to true
			set muted to true
			play
		end tell
	end repeat
	repeat with this_doc in doc_list
		set muted of this_doc to false
		present this_doc
		delay 5
		set presenting of this_doc to false
		delay 2
		set muted of this_doc to true
	end repeat
	set muted of (item 1 of doc_list) to false
end tell
-- 1440, 900 my desktop bounds

Watching these movies makes me a little dizzy. :slight_smile:

gl,

Hi,

In case you’re still there, crunched the script a little:


-- get screen bounds
tell application "Finder"
	set b to bounds of window of desktop
end tell
-- {0, 0, 1440, 900} my desktop bounds
set {xsize, ysize} to {item 3, item 4} of b
-- get increment values
set x to xsize div 4
set y to ysize div 3
set the_bounds to {}
-- init y
set y1 to 0
repeat 3 times
	-- init x
	set x1 to 0
	repeat 4 times
		set end of the_bounds to {x1, y1, x1 + x, y1 + y}
		-- increment by x
		set x1 to x1 + x
	end repeat
	-- increment by y
	set y1 to y1 + y
end repeat

set f to choose folder
tell application "Finder"
	set file_list to (every file of f) as alias list
end tell
set n to count file_list

tell application "QuickTime Player"
	activate
	set doc_list to {}
	repeat with i from 1 to n
		set this_file to item i of file_list
		set this_doc to (open this_file)
		set end of doc_list to this_doc
		set this_bounds to item i of the_bounds
		set bounds of front window to this_bounds
		tell this_doc
			set looping to true
			set muted to true
			play
		end tell
	end repeat
	repeat with this_doc in doc_list
		set muted of this_doc to false
		present this_doc
		delay 5
		set presenting of this_doc to false
		delay 2
		set muted of this_doc to true
	end repeat
	set muted of (item 1 of doc_list) to false
end tell

gl,

Sorry, had a few days off wasn’t paying attention

Thanks for the help I’ll look at this.