Quicktime_open each new movie in the same QTwindow?

Hi,
with applescript I need to open different movies. I do this with the following script:

-- opent een jpeg in Quicktime--
set pictureFile to alias "Jip:Users:selma:Desktop:ISH:images:EasyDigestible.jpg"
tell application "QuickTime Player"
	activate
	open pictureFile
	--present movie scale screen
	set the position of window 1 to {50, 20}
end tell

each time I activate this script the movie opens in a different window. Is there a possibility to open a movie in the window which is already open?

And (another question) is there a way to activate the ‘loop’ (apple+L) in quicktime with applescript?

thanx

I believe that you need QT Pro to get it to play automatically.

Then something like this would work:

set pictureFile to lias "Jip:Users:selma:Desktop:ISH:images:EasyDigestible01.jpg" 
tell application "QuickTime Player"
	open image sequence pictureFile seconds per frame 3 -- set the number to the speed you would like
end tell

Place your images in a folder, ending each with a sequential number in the order that you want them played. The aspect ratios of the pictures should be the same as the first image, otherwise they will be skewed to fit the aspect of the first image.
If you don’t have QT Pro, you will have to step through each frame manually.

I found the problem. In the player preferences of Quicktime there is an option to open every movie in the same player.

Know the only thing I need to know is how I can activate the loop. I have short movies (no more .JPG but .MOV) which I want to play continuesly when there is no input.
Or when the movie is at its end that it plays back till its at the beginning of the movie (I don’t mind).

Thanx in advance

hey selma, to loop just add “set looping of movie 1 to true” somewhere in your script

I wrote a little script that enables me to present movies in fullscreen mode, without having to use QT Pro. It works in macos9.2. Feel free to use any of the code from that, if it’s useful to your purposes.

have fun!


–note: i forgot why i added that 'if name of movie 1 != “untitled 1” then ’ line… it had something to do with my personal settings i think… if you don’t need it, ommit it, but don’t forget to ommit one of the "end if"s at the end as well :smiley:

– note 2: in my script != shows up as a crossed out “=” (hold down alt and + )sign but for some reason the forum changed it to !=


on run

-- DETERMINE THE MODE
display dialog "present movie:" buttons {"normal", "double", "screen"} default button 1
set theAnswer to the result
display dialog "loop movie:" buttons {"yes", "no"} default button 1
set theAnswer2 to the result
try
	
	
	
	
	tell application "QuickTime Player"
		activate
		if name of movie 1 != "untitled 1" then

			if the button returned of the theAnswer is "normal" then
				set bscale to normal
			else if the button returned of the theAnswer is "double" then
				set bscale to double
			else
				set bscale to screen
			end if
			if the button returned of the theAnswer2 is "yes" then set looping of movie 1 to true
			present movie 1 scale bscale mode normal display 1
		end if
	end tell
	
on error (errmsg)
	
	display dialog errmsg
	
end try

end run

to end full screen mode just click your mousebutton