Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

applescript help

I need help writing a simple applescript.

Basically, I want ALL windows for an application (in this case, lets say "Safari") to be moved to top left corner of the screen (0,0) so I can see/access them. For whatever reason, some windows have been positioned off screen and out of view.

This app is tricky, it has many windows, not all of which are visible. I need a script that will reposition ALL windows to 0,0. regardless of displays, spaces, etc...

(I have tried all other options: spaces, detect display, gather windows, disconnecting monitors, reconnecting monitors and repositioning windows etc, etc, etc.)

any help would be much appreciated.

MacBook Pro 17" unibody, Mac OS X (10.6.3)

Posted on Dec 6, 2010 11:11 PM

Reply
3 replies

Dec 7, 2010 4:21 PM in response to Arkouda

Failing that, try replacing Safari in the second part of this script:


<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;">
tell application "Finder"
set displaySize to bounds of window of desktop
set displayWidth to item 3 of displaySize
set displayHeight to item 4 of displaySize
end tell
tell application "Safari"
set windowList to windows
repeat with theWindow in windowList
set bounds of theWindow to {0, 0, displayWidth, displayHeight}
end repeat
end tell </pre>

applescript help

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.