0

How can I make Quicktime to always open in Fit to Screen option (available at View->Fit to Screen)? It doesn't seem to remember the last window size.

Is it possible to attach a script to a program, so that every time the program launches, the attached script executes? In my case, it would change the window size to Fit to Screen

  • 1
    Don't know if you had already looked at my answer however I wanted to let you know that I've updated it a couple of times so you may want to look at it again if you had already looked earlier. – user3439894 Apr 30 '16 at 15:39
1

QuickTime Player doesn't have a Preferences... menu command like other applications do, nor does it have a com.apple.quicktime.plist file to manipulate. Therefore there isn't anything you can do directly, however here is a workaround of sorts.

Note that this workaround requires changing the default application for file types, e.g. .mov, you'd normally open directly with QuickTime Player to the application created herein, called: QTP Fit to Screen.app

Using Automator create a new Application and add a Run Shell Script Action.

Change: Pass input: [to stdin] to [as argument]

Add the following code:

if [[ ! -z $1 ]]; then

    open -a "QuickTime Player" "$1"

    osascript -e 'tell application "QuickTime Player" to activate' \
              -e 'delay 1' \
              -e 'tell application "System Events" to keystroke "3" using command down' \
              -e 'tell application "QuickTime Player" to play front document'
fi

enter image description here

Save it as an Application named: QTP Fit to Screen

In order for QTP Fit to Screen to be the global default app for, e.g. .mov, files you'd open in QuickTime Player you'll have to use the Default Apps Preference Pane, RCDefaultApp by Rubicode to change which application opens a given Extension.

Install RCDefaultApp and then in System Preferences > Default Apps select the Extensions tab and scroll down to mov and then change the Default Application: to: QTP Fit to Screen

Now then you double-click .mov files in Finder or accessing them from Spotlight the QTP Fit to Screen application will open the target file in Quick Time Player, set View to Fit to Screen and start playing the file.

Note: If you do not want it to automatically start playing the file then remove the line of code, the one that has "play front document" in it.

If you need modify other default methods of file types, Apps, URLs, UTIs, etc. the Default Apps Preference Pane, RCDefaultApp by Rubicode, is a great utility for it.

To make the QTP Fit to Screen.app application bundle look better in the Applications folder you can copy and paste the QuickTime Player.app application icon from its Get Info sheet to the icon of the Get Info sheet for QTP Fit to Screen.app.


Note: I added the if statement to the code so the QTP Fit to Screen application doesn't error out when executed by itself. In other words, double-clicking it will essentially do nothing, whereas without it will throw a couple of error messages.

  • daaaamn, Apple really doesnt like QTPlayer. Thank you, kind sir! – sanjihan Apr 30 '16 at 16:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .