Go Back   The macosxhints Forums > OS X Help Requests > Applications



Reply
 
Thread Tools Rate Thread Display Modes
Old 08-06-2007, 10:17 AM   #1
Kingers
Prospect
 
Join Date: May 2007
Posts: 10
Question Quicktime Player - Always Loop

Hi,

Does anyone know a way to modify the quicktime player so that the "loop" option under the "view" menu will always be checked?

e.g. Every file opened in quicktime will always be set to loop forever.

Thanks,
Kingers

p.s. I know other mac compatible players do this but I want to get this working with quicktime.
Kingers is offline   Reply With Quote
Old 08-07-2007, 04:24 AM   #2
Kingers
Prospect
 
Join Date: May 2007
Posts: 10
Anyone have any ideas? I tried using interface builder to default to checked but it is reset when a new file is opened.
Kingers is offline   Reply With Quote
Old 08-07-2007, 07:42 AM   #3
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
Maybe just use AppleScript to set this and run QuickTime Player from your AppleScript instead of by double-clicking the movie file.
__________________
hayne.net/macosx.html
hayne is offline   Reply With Quote
Old 08-07-2007, 08:31 AM   #4
Kingers
Prospect
 
Join Date: May 2007
Posts: 10
Would that work with every file? If for example I did this and then from quicktime player I opened a new file, would the loop still apply?
Kingers is offline   Reply With Quote
Old 08-07-2007, 09:04 AM   #5
capitalj
All Star
 
Join Date: Dec 2005
Location: Plymouth, Massachusetts
Posts: 659
To do what you want with AppleScript, you'd need a script that tells QuickTime Player to open the chosen movie and then loop it.

It would work on any movie, and if you plan on always opening movies that way, you could paste a QuickTime icon on it and stick it in your dock or something. A quick example:

Code:
set theMovie to (choose file without invisibles)
tell application "QuickTime Player"
	activate
	open theMovie 
	set the looping of document 1 to true
	play document 1
end tell
A droplet might be better, but that's a start.
capitalj is offline   Reply With Quote
Old 08-07-2007, 12:30 PM   #6
Kingers
Prospect
 
Join Date: May 2007
Posts: 10
Thanks for the script. It prompted me to learn about droplets and it was the answer. I created this script:

on open of target_files
set theMovie to target_files
tell application "QuickTime Player"
activate
open theMovie
set the looping of document 1 to true
play document 1
end tell
end open

Compiled into application and set all movie files to open with.

Thanks Everyone!
Kingers is offline   Reply With Quote
Old 08-08-2007, 05:17 AM   #7
Kingers
Prospect
 
Join Date: May 2007
Posts: 10
I am a recent Mac convert and one of the Windows apps I missed was the wonderful Media Player Classic (MPC). While this was not ported to Mac OS X, Quicktime Player offers almost all of the functions I needed except one.

I am a huge fan of loading a music or video file and having it automatically repeat over and over. Quicktime supports looping in this fashion but does not support a global loop for every file, as such I had to select loop each time.

Thanks to some suggestions in the forums (capitalj) I came up with an AppleScript droplet to do the job:

<code>
on open of target_files
set theMovie to target_files
tell application "QuickTime Player"
activate
open theMovie
set the looping of document 1 to true
play document 1
end tell
end open
</code>

However this was only partially successful. It mean't I had to drag each file onto the droplet in order for it to work. After some poking around I discovered that I needed to compile it into an application bundle using Xcode. This way I could associate it with certain file types e.g. mp4 and as a result I could double click them and have them open in quicktime with the loop setting checked.

I also took the time to update the info.plist with the file extensions list from the popular VLC player (I chose not to use it because I don't like the video window being seperate). Thus files types associated with the application are now more detailed than just "wmv" -> "Windows Media Video".

You could also copy the icons (*.icns) from the VLC package into the new app's resources and you would get a complete set of icons as well.

My final step was to update the application icon to the quicktime icon.

The final result is the attached compiled application (for copyright purposes, the icons are not included but you can do this yourself if you want).
Attached Files
File Type: zip MediaPlayer.zip (34.6 KB, 1028 views)
Kingers is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 10:15 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.