Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I launch a movie in QuickTime I'd like for it to always open up on my second display (not the default primary one). I'm actually opening the movie via AppleScript from iTunes so an applescript solution would be OK.

There used to be a preference setting in Quicktime that would let you default it to a particular display but that seems to have been lost with QuickTime X.

share|improve this question

4 Answers 4

OK, so I went ahead and captured the bounds of the window placed in the middle of my second screen and just added a line in my AppleScript to push the new window there every time.

tell application "iTunes"
    set sel to item 1 of selection
    set loc to (get location of sel)
end tell

tell application "QuickTime Player"
    open loc
    activate
    set bounds of front window to {2460, 256, 3299, 736}
    present front document
    play front document
end tell

Now from iTunes I can select the movie I want, run the script, and QuickTime will open it up in full screen on the second monitor and start playing it. Still more hacked together than I would like, but will do for now I suppose.

share|improve this answer
    
Could have sworn this worked the first few times I tried it, but it's not working at all now. I suspect I'm missing some essential bits when it comes to setting the bounds of the QuickTime Player window. –  Bryan Schuetz Dec 23 '09 at 13:48
    
OK, so I'm an idiot the above script does work. Was accidentally using an old script with the same name that did not have the "Set Bounds" bit in it. It's always pilot error isn't it. –  Bryan Schuetz Dec 29 '09 at 13:18

http://forums.macosxhints.com/showthread.php?t=59812 contains code to send all an application's windows to a second monitor. You could either run the code on Quicktime Player, or possibly extract the relevant second-monitor-location logic and run it on a single window..

Mirrored code here, for posterity:

tell application "System Events"
    --  set visible of process "Untitled" to false -- don't use name extension
    --  delay 1
    set Name_App to item 1 of (get name of processes whose frontmost is true)
end tell

-- broken
--tell (do shell script "defaults read /Library/Preferences/com.apple.windowserver | grep -w Width") to set {monitor1_width, monitor2_width} to {word 3 as number, word 6 as number}
-- fixed by:
set {monitor1_width, monitor2_width} to {1280, 1024}

--tell (do shell script "defaults read /Library/Preferences/com.apple.windowserver | grep -w Height") to set {monitor1_height, monitor2_height} to {word 3 as number, word 6 as number}


tell application Name_App
    try
        set {x, y, xx, yy} to bounds of front window
        set The_Scriptable to true
    on error
        set The_result to my get_position(Name_App)
        if The_result is {} then return
        set {x, y} to The_result
        set The_Scriptable to false
    end try
    if The_Scriptable then
        if x <= monitor1_width and xx >= monitor1_width then -- the window is in the first monitor
            if xx > monitor2_width then set xx to monitor2_width
            set New_bounds to {monitor1_width + x, y, monitor1_width + xx, yy}
        else if x >= monitor1_width then -- the window is in the second monitor
            if xx - x > monitor1_width then
                set xx to monitor1_width
            else
                set xx to xx - x
            end if
            set New_bounds to {x - monitor1_width, y, xx, yy}
        else
            --the window is between the monitors
        end if
        set bounds of front window to New_bounds
    else
        if x <= monitor1_width then -- the window is in the first monitor
            set new_Position to {monitor1_width + x, y}

        else -- the window is in the second monitor
            set new_Position to {x - monitor1_width, y}
        end if
        tell application "System Events" to tell process Name_App to set position of front window to new_Position
    end if
    tell front window to "Zoom"

end tell

on get_position(This_App)
    try
        tell application "System Events" to tell process This_App
            return position of front window
        end tell
    on error
        return {}
    end try
end get_position
share|improve this answer

I know that when I used to run a dual-monitor setup it'd remember things I had on the second monitor, even when I didn't have it connected. If you drag the window into that display you might be able to train it to remember to put it there.

share|improve this answer

Apparently, QT X that shipped w/ 10.6 isn't complete. There should be an optional install to reinstall an older version of QT from the SL install disc. Doesn't look like QT X allow you to set the default full screen monitor.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.