• 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: Opening Finder windows in a dual monitor setup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening Finder windows in a dual monitor setup


  • Subject: Re: Opening Finder windows in a dual monitor setup
  • From: Doug McNutt <email@hidden>
  • Date: Thu, 29 Dec 2005 11:52:09 -0700

At 11:20 -0500 12/29/05, Tim wrote:
I have a dual monitor setup.  I use an applescript that creates two
windows, one on top and one on bottom.  Here's a snippet of the code:

SNIP

I have done it only with Terminal.app where it's a real PITA. I have a monitor mounted above my main monitor, actually it's number 4. Many applications, but not Finder, don't understand that and will refuse to drag a window when the drag passes through the menubar. If you want to see the code I used to fool Terminal.app in that regard check out <ftp://ftp.macnauchtan.com/Software/Progress/tViewInit>

The arithmetic you need to know is that the center of the graphic coordinate system in the Apple world is at the top left of the monitor that contains the menu bar. It's also at the top left of the menu bar and some apps don't believe that the menu bar is actually part of the space.

Positive values for the y - vertical - axis increase downward and that may seem reversed from what you learned in geometry but it makes sense for printing in English.

Positive values for the x axis increase to the right in the "normal" way which probably frustrates the Arabs.

The units for both axes are pixels on whatever screen the coordinates point to. There are really memory elements in video RAM.

My guess is that you need to use some negative numbers in your {bounds} lists. When talking to Terminal.app it's necessary to tell Terminal to move a window, ask what the new bounds are, check to see if it worked, and then do it again if necessary. I donno about Finder but if the behavior is linked to Cocoa frameworks it may be so.

It might be helpful to use a mouse to drag the finder window where you want it and then use an AppleScript request to display what Finder thinks its new bounds are.

Note also that {bounds} is the two points top-left and bottom right which is not to be confused with top-left-bottom-right. Top-left is a cartesian point with the x given first and the y given second in normal geometric fashion. So bounds comes out {left top right bottom}. If that's confusing, join the club.

And if you really want fun, try X-11 and gnome. There the default location for the origin of graphic space is the top left of the rectangle enclosing all monitors. With one on top, one on the left and one on the right there is no monitor which displays the origin. That's a lot of fun when an X-11 app throws a window at the standard location and expects a mouse click in a location where you can't see it and the mouse won't go there. And, by the way, the units are not pixels for all applications. Some, gnumeric for instance, use the width and height of a monospaced character.
--


Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
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


References: 
 >Opening Finder windows in a dual monitor setup (From: Tim <email@hidden>)

  • Prev by Date: AppleScript Subroutines
  • Next by Date: Re: AppleScript Subroutines
  • Previous by thread: Opening Finder windows in a dual monitor setup
  • Next by thread: Re: Opening Finder windows in a dual monitor setup
  • Index(es):
    • Date
    • Thread