<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Move All Windows To Your Main Screen&#8230;</title>
	<atom:link href="http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/</link>
	<description>So Little To Say, and So Little Time To Say It.</description>
	<lastBuildDate>Thu, 11 Mar 2010 08:24:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Recovering off screen windows in Mac OS X &#124; Tony Amoyal</title>
		<link>http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/comment-page-1/#comment-3500</link>
		<dc:creator>Recovering off screen windows in Mac OS X &#124; Tony Amoyal</dc:creator>
		<pubDate>Thu, 18 Feb 2010 22:46:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/#comment-3500</guid>
		<description>[...] Recovering off screen windows in Mac OS X By Tony &#124; Published: February 18, 2010  I constantly lose windows on OS X. I think it&#8217;s because sometimes I am connected to an external monitor so OS X gets confused when I am not. I found a great solution online that I would like to re-post here so that I never have to look for it again and I can help share it with the world. All credit goes to the author of the original article. [...]</description>
		<content:encoded><![CDATA[<p>[...] Recovering off screen windows in Mac OS X By Tony | Published: February 18, 2010  I constantly lose windows on OS X. I think it&#8217;s because sometimes I am connected to an external monitor so OS X gets confused when I am not. I found a great solution online that I would like to re-post here so that I never have to look for it again and I can help share it with the world. All credit goes to the author of the original article. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cflex</title>
		<link>http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/comment-page-1/#comment-3497</link>
		<dc:creator>Cflex</dc:creator>
		<pubDate>Wed, 06 Jan 2010 16:53:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/#comment-3497</guid>
		<description>I tested this with a 3 display setup on Snow Leopard. I was hoping it would gather all windows on all 3 displays to my center display (my main display) where my dock resides. It didn&#039;t work for me until I replaced the Finder tell block with the &quot;set_screen&quot; block as mentioned in this post above:
&lt;blockquote cite=&quot;#commentbody-5&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-5&quot; rel=&quot;nofollow&quot;&gt;Jonathan Laliberte&lt;/a&gt; :&lt;/strong&gt;
AFAIK, there is no way to get the size of the main display with Applescript (not easily anyway). The current Finder block gets the size of the desktop, which is going to be the size of all connected displays. The following change would accomplish what you are asking for though:
At the top of the script, remove the Finder tell block:
tell application “Finder”
set _b to bounds of window of desktop
set screen_width to item 3 of _b
set screen_height to item 4 of _b
end tell
replace it with:
set screen_width to 
set screen_height to  
So, if your screen resolution is 1440×900, you would have
set screen_width to 1440
set screen_height to 900
&lt;/blockquote&gt;

After doing that, it works for me perfectly. Any windows placed anywhere on my three displays will all magically transport themselves to the screen that contains my dock.

FYI, I found this exact same script (verbatim) on another blog. http://www.leonamarant.com/2008/04/02/how-to-get-off-screen-windows-back-on-your-mac-os-x-v105/#comments 

I&#039;m not sure who the real author is, but that blog didn&#039;t have the solution to modify the script for 3 displays, and the blog here did. 

So thank you to the original author, whomever that may be. I&#039;m very happy now.</description>
		<content:encoded><![CDATA[<p>I tested this with a 3 display setup on Snow Leopard. I was hoping it would gather all windows on all 3 displays to my center display (my main display) where my dock resides. It didn&#8217;t work for me until I replaced the Finder tell block with the &#8220;set_screen&#8221; block as mentioned in this post above:</p>
<blockquote cite="#commentbody-5"><p>
<strong><a href="#comment-5" rel="nofollow">Jonathan Laliberte</a> :</strong><br />
AFAIK, there is no way to get the size of the main display with Applescript (not easily anyway). The current Finder block gets the size of the desktop, which is going to be the size of all connected displays. The following change would accomplish what you are asking for though:<br />
At the top of the script, remove the Finder tell block:<br />
tell application “Finder”<br />
set _b to bounds of window of desktop<br />
set screen_width to item 3 of _b<br />
set screen_height to item 4 of _b<br />
end tell<br />
replace it with:<br />
set screen_width to<br />
set screen_height to<br />
So, if your screen resolution is 1440×900, you would have<br />
set screen_width to 1440<br />
set screen_height to 900
</p></blockquote>
<p>After doing that, it works for me perfectly. Any windows placed anywhere on my three displays will all magically transport themselves to the screen that contains my dock.</p>
<p>FYI, I found this exact same script (verbatim) on another blog. <a href="http://www.leonamarant.com/2008/04/02/how-to-get-off-screen-windows-back-on-your-mac-os-x-v105/#comments" rel="nofollow">http://www.leonamarant.com/2008/04/02/how-to-get-off-screen-windows-back-on-your-mac-os-x-v105/#comments</a> </p>
<p>I&#8217;m not sure who the real author is, but that blog didn&#8217;t have the solution to modify the script for 3 displays, and the blog here did. </p>
<p>So thank you to the original author, whomever that may be. I&#8217;m very happy now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Lawton</title>
		<link>http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/comment-page-1/#comment-3483</link>
		<dc:creator>Scott Lawton</dc:creator>
		<pubDate>Wed, 14 Oct 2009 23:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/#comment-3483</guid>
		<description>Here&#039;s a variation that preserves the y value ... though is hardcoded for a wide monitor on the LEFT.  I also hardcoded for a single app.

tell application &quot;System Events&quot;
	
	tell process &quot;Safari&quot;
	
		repeat with x from 1 to (count windows)
			set winPos to position of window x
			set _x to item 1 of winPos
			set _y to item 2 of winPos
			
			if _x &gt; 1920 then
				name of window x
				set position of window x to {_x - 1920, _y}
			end if
		end repeat
		
	end tell
end tell</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a variation that preserves the y value &#8230; though is hardcoded for a wide monitor on the LEFT.  I also hardcoded for a single app.</p>
<p>tell application &#8220;System Events&#8221;</p>
<p>	tell process &#8220;Safari&#8221;</p>
<p>		repeat with x from 1 to (count windows)<br />
			set winPos to position of window x<br />
			set _x to item 1 of winPos<br />
			set _y to item 2 of winPos</p>
<p>			if _x &gt; 1920 then<br />
				name of window x<br />
				set position of window x to {_x &#8211; 1920, _y}<br />
			end if<br />
		end repeat</p>
<p>	end tell<br />
end tell</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: macula</title>
		<link>http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/comment-page-1/#comment-3385</link>
		<dc:creator>macula</dc:creator>
		<pubDate>Wed, 20 May 2009 13:24:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/#comment-3385</guid>
		<description>Here is an applescript that does not require assistive devices to be on:

tell application &quot;System Preferences&quot;
	set current pane to pane id &quot;com.apple.preference.displays&quot;
	reveal (first anchor of current pane whose name is &quot;displaysArrangementTab&quot;)
	tell application &quot;System Events&quot; to tell process &quot;System Preferences&quot;
		set frontmost to true
		click checkbox &quot;Recopie vidéo&quot; of group 1 of tab group 1 of front window
	end tell
	set current pane to pane id &quot;com.apple.preference.displays&quot;
	reveal (first anchor of current pane whose name is &quot;displaysArrangementTab&quot;)
	tell application &quot;System Events&quot; to tell process &quot;System Preferences&quot;
		set frontmost to true
		click checkbox &quot;Recopie vidéo&quot; of group 1 of tab group 1 of front window
	end tell
end tell
property brightness_level : 0.0
tell application &quot;System Preferences&quot;
	activate
	set current pane to pane &quot;com.apple.preference.displays&quot;
	tell application &quot;System Events&quot;
		set value of slider 1 of group 2 of tab group 1 of window &quot;LCD couleur&quot; of process &quot;System Preferences&quot; to brightness_level
	end tell
	quit
end tell


Be sure to replace &quot;LCD couleur&quot; with &quot;color LCD&quot; and &quot;Recopie vidéo&quot; with &quot;Mirror displays&quot; for English language installations of MacOS.

The last 8 lines of code turn the laptop display brightness all the way down, as I like to do when I work with an external monitor. If you would rather keep the laptop monitor active, just delete those lines of code.

Enjoy!</description>
		<content:encoded><![CDATA[<p>Here is an applescript that does not require assistive devices to be on:</p>
<p>tell application &#8220;System Preferences&#8221;<br />
	set current pane to pane id &#8220;com.apple.preference.displays&#8221;<br />
	reveal (first anchor of current pane whose name is &#8220;displaysArrangementTab&#8221;)<br />
	tell application &#8220;System Events&#8221; to tell process &#8220;System Preferences&#8221;<br />
		set frontmost to true<br />
		click checkbox &#8220;Recopie vidéo&#8221; of group 1 of tab group 1 of front window<br />
	end tell<br />
	set current pane to pane id &#8220;com.apple.preference.displays&#8221;<br />
	reveal (first anchor of current pane whose name is &#8220;displaysArrangementTab&#8221;)<br />
	tell application &#8220;System Events&#8221; to tell process &#8220;System Preferences&#8221;<br />
		set frontmost to true<br />
		click checkbox &#8220;Recopie vidéo&#8221; of group 1 of tab group 1 of front window<br />
	end tell<br />
end tell<br />
property brightness_level : 0.0<br />
tell application &#8220;System Preferences&#8221;<br />
	activate<br />
	set current pane to pane &#8220;com.apple.preference.displays&#8221;<br />
	tell application &#8220;System Events&#8221;<br />
		set value of slider 1 of group 2 of tab group 1 of window &#8220;LCD couleur&#8221; of process &#8220;System Preferences&#8221; to brightness_level<br />
	end tell<br />
	quit<br />
end tell</p>
<p>Be sure to replace &#8220;LCD couleur&#8221; with &#8220;color LCD&#8221; and &#8220;Recopie vidéo&#8221; with &#8220;Mirror displays&#8221; for English language installations of MacOS.</p>
<p>The last 8 lines of code turn the laptop display brightness all the way down, as I like to do when I work with an external monitor. If you would rather keep the laptop monitor active, just delete those lines of code.</p>
<p>Enjoy!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Laliberte</title>
		<link>http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/comment-page-1/#comment-3383</link>
		<dc:creator>Jonathan Laliberte</dc:creator>
		<pubDate>Thu, 30 Apr 2009 03:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/#comment-3383</guid>
		<description>JR: It should be possible. Unfortunately, I don&#039;t have the time to make changes to the script. If you end up advancing it, let me know and I&#039;ll link to your changes.</description>
		<content:encoded><![CDATA[<p>JR: It should be possible. Unfortunately, I don&#8217;t have the time to make changes to the script. If you end up advancing it, let me know and I&#8217;ll link to your changes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JR</title>
		<link>http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/comment-page-1/#comment-3382</link>
		<dc:creator>JR</dc:creator>
		<pubDate>Wed, 29 Apr 2009 05:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/#comment-3382</guid>
		<description>&lt;a href=&quot;#comment-3376&quot; rel=&quot;nofollow&quot;&gt;@Jonathan Laliberte&lt;/a&gt; 

This is a pretty slick idea.  Could this idea be extended to iterate through all open applications, generically, and their child windows?  In my case I am running Spaces (&lt;i&gt;6&lt;/i&gt; of them) and have work and projects setup up in each - not necessarily all the same all the time...

I will try it but I am not sure I am Applescript-savvy enough...</description>
		<content:encoded><![CDATA[<p><a href="#comment-3376" rel="nofollow">@Jonathan Laliberte</a> </p>
<p>This is a pretty slick idea.  Could this idea be extended to iterate through all open applications, generically, and their child windows?  In my case I am running Spaces (<i>6</i> of them) and have work and projects setup up in each &#8211; not necessarily all the same all the time&#8230;</p>
<p>I will try it but I am not sure I am Applescript-savvy enough&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Muscarella</title>
		<link>http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/comment-page-1/#comment-3380</link>
		<dc:creator>Bob Muscarella</dc:creator>
		<pubDate>Sun, 08 Mar 2009 19:56:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/#comment-3380</guid>
		<description>I am a complete novice to using scripts but found this site because i&#039;m having the same problem with a window stuck off screen.  when i try to run the script it gives an error message saying: 

&quot;can&#039;t get bounds of window of desktop&quot;

and it highlights the &#039;bounds&#039; in the line:
	set _b to bounds of window of desktop

can you help?</description>
		<content:encoded><![CDATA[<p>I am a complete novice to using scripts but found this site because i&#8217;m having the same problem with a window stuck off screen.  when i try to run the script it gives an error message saying: </p>
<p>&#8220;can&#8217;t get bounds of window of desktop&#8221;</p>
<p>and it highlights the &#8216;bounds&#8217; in the line:<br />
	set _b to bounds of window of desktop</p>
<p>can you help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: julie</title>
		<link>http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/comment-page-1/#comment-3378</link>
		<dc:creator>julie</dc:creator>
		<pubDate>Wed, 04 Mar 2009 20:17:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/#comment-3378</guid>
		<description>This script saved me when the stoopid iPhone emulator &#039;fell off&#039; my main screen never to be retrieved - thanks!</description>
		<content:encoded><![CDATA[<p>This script saved me when the stoopid iPhone emulator &#8216;fell off&#8217; my main screen never to be retrieved &#8211; thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Laliberte</title>
		<link>http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/comment-page-1/#comment-3376</link>
		<dc:creator>Jonathan Laliberte</dc:creator>
		<pubDate>Thu, 05 Feb 2009 02:44:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/#comment-3376</guid>
		<description>JR, I actually did this a few weeks ago but never posted it. I&#039;ve posted it with limited description, good luck!
&lt;a href=&quot;http://www.jonathanlaliberte.com/2009/02/04/restore-previous-display-window-positions-applescript/&quot; rel=&quot;nofollow&quot;&gt;Restore Previous Display Window Positions&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>JR, I actually did this a few weeks ago but never posted it. I&#8217;ve posted it with limited description, good luck!<br />
<a href="http://www.jonathanlaliberte.com/2009/02/04/restore-previous-display-window-positions-applescript/" rel="nofollow">Restore Previous Display Window Positions</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JR</title>
		<link>http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/comment-page-1/#comment-3375</link>
		<dc:creator>JR</dc:creator>
		<pubDate>Thu, 05 Feb 2009 01:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonathanlaliberte.com/2007/10/19/move-all-windows-to-your-main-screen/#comment-3375</guid>
		<description>Could this be modified to save the window positions and the restore them later?  

This would be for the situation where your MBP is connected with an external monitor with apps everywhere on both.  Then you sleep your MBP, disconnect the external, and you decide you need to open it without the external connected.  All your apps get shoved to the laptop screen - annoying but understandable.  Then you sleep it again, come back to your external monitor and wake up your MBP.  How to get all those apps (times how many ever Spaces you use...) back to the external monitor without moving them all manually?

Could there be a Restore Window Position script?</description>
		<content:encoded><![CDATA[<p>Could this be modified to save the window positions and the restore them later?  </p>
<p>This would be for the situation where your MBP is connected with an external monitor with apps everywhere on both.  Then you sleep your MBP, disconnect the external, and you decide you need to open it without the external connected.  All your apps get shoved to the laptop screen &#8211; annoying but understandable.  Then you sleep it again, come back to your external monitor and wake up your MBP.  How to get all those apps (times how many ever Spaces you use&#8230;) back to the external monitor without moving them all manually?</p>
<p>Could there be a Restore Window Position script?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
