Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

goldenlotus

macrumors regular
Original poster
Oct 21, 2007
153
0
Brooklyn, NY
I've written scripts which allow me to switch windows between my primary and secondary displays when browsing Safari. I've loaded the two scripts into Quicksilver so that I can trigger them with key commands.

Here is the code for the primary display:

tell application "Safari"
activate
set the bounds of the first window to {0, 0, 1440, 900}
end tell

Here is the code for the secondary display:

tell application "Safari"
activate
set the bounds of the first window to {1442, 0, 2879, 900}
end tell

The problem is once I've switched back and forth a few times the secondary display script seems to take over. I can't even drag any windows into the primary display. Can anyone help me out with this? I'm using OS X 10.4.10 with Safari 2.0.4 on a MacPro.
 
Does anyone know how to assign the script to effect only the window I'm in when the script is run? Now I'm refering to it as "the first window", but when I open a new window the preivous script is still running an will move the new window to my secondary screen. Is there any way of assigning a key command directly in Applescript Editor? I have a feeling that the problem may be caused by Quicksilver.

Any help would be greatly appriciated. I guess I'll post on http://macscripter.net/ but thought I'd try here first.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.