• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: moving an application window from one display to another
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: moving an application window from one display to another


  • Subject: Re: moving an application window from one display to another
  • From: David Wolfe <email@hidden>
  • Date: Thu, 12 May 2005 15:21:45 -0400

I frequently need to move windows from one display to another or to set the window's size. I found the easiest way is to create a window where I want it and size it appropriately. Then I GET the window bounds from the application (or Finder). In the RESULTS window, note the coordinates, then change the GET statement to SET and put in the coordinates provided.

---
tell application "whatever"
	activate
	GET bounds of window "my dummy window"
end tell
---

reports {0, 44, 763, 277}

These coordinates work as if the multiple monitors are actually one huge one. Then I simply change the script:

---
tell application "whatever"
	activate
	SET bounds of window "my missing window" {0, 44, 763, 277}
end tell
---

Running the script will then place the window at the same position and size as the one you created to GET the bounds of.


David Wolfe

Hi, I am having a problem with an application and was wondering if
Applescript might be the way to solve this.
  I have a Titanium Powerbook that I am trying to use for
displaying maps in my truck using a GPS.  The application is MacGPS
Pro.  It is a great application for displaying my current position
on USGS maps.  I have a 7" Xenarc touchscreen mounted on the dash
and this is connected to the Powerbook via VGA.  The problem is
that the USGS quads are contained in separate files, so as my
position moves the app has to open the new quad map.  MacGPS Pro
opens up the new quad in a new window and, for some reason, it
chooses to place the window on the largest available screen.  This
means that even though I'm viewing the map on the Xenarc, the new
map opens up on the Powerbook's screen.  (I really don't want to be
dragging windows around and resizing them while I'm driving.)  I
have confirmed this behavior with the author of the application and
he doesn't have a fix for it yet.
  Is it possible to use Applescript to find the map window, move it
to the smaller of the two displays, and then make the window
fullscreen?
  Since this machine's LCD was kindof messed up anyway I've removed
it from the machine completely in the hope that the Powerbook would
see the Xenarc as its only display.  Unfortunately it still thinks
that it has its main display available.  If there were some way to
convince the machine that it really doesn't have a main screen
anymore I think this problem would go away.
  I'm open to any ideas or suggestions.
  Thanks for your time,
    -M@

_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: moving an application window from one display to another
      • From: Matthew Hixson <email@hidden>
  • Prev by Date: Re: moving an application window from one display to another
  • Next by Date: Re: Error Types
  • Previous by thread: Re: moving an application window from one display to another
  • Next by thread: Re: moving an application window from one display to another
  • Index(es):
    • Date
    • Thread