• 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
how to get bounds of X11 windows using Applescript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to get bounds of X11 windows using Applescript?


  • Subject: how to get bounds of X11 windows using Applescript?
  • From: Bill Janssen <email@hidden>
  • Date: Sun, 22 Jun 2008 10:35:43 PDT
  • Comments: In-reply-to Jeremy Huddleston <email@hidden> message dated "Fri, 20 Jun 2008 20:23:43 -0700."

Here's another Applescript question:  how can I get the windows bounds
of my X11 windows using Applescript?

I see that X11 is an 'application process' according to 'System
Events' (though I admit I'm not sure what an 'application process' is :-):

% osascript -e 'tell application "System Events"' -e '  return application processes as list' -e 'end tell'
loginwindow, Dock, AirPort Base Station Agent, Spotlight, SystemUIServer, Finder, iTunesHelper, X11, quartz-wm, AppleSpell, DashboardClient, iTunes, Camino, JavaApplicationStub, mdworker, System Events, osascript
%

I can get the window bounds of the top-level Camino window:

% osascript -e 'tell application "Camino"' -e '  return bounds of first window' -e 'end tell'
104, 22, 1133, 1024
%

But when I try it with X11:

% osascript -e 'tell application "X11"' -e '  return bounds of first window' -e 'end tell'
32:38: execution error: X11 got an error: Can't get bounds of window 1. (-1728)
%

which, according to MacErrors.h, means this:

  errAENoSuchObject             = -1728, /* e.g.,: specifier asked for the 3rd,
                                            but there are only 2. Basically, this
                                            indicates a run-time resolution
                                            error. */

Any way I can query X11 via Applescript?

Bill
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list      (email@hidden)

This email sent to email@hidden

  • Follow-Ups:
    • Re: how to get bounds of X11 windows using Applescript?
      • From: Harald Hanche-Olsen <email@hidden>
    • Re: how to get bounds of X11 windows using Applescript?
      • From: Doug McNutt <email@hidden>
References: 
 >can't access 'System Events' because X11Application can't be found? (From: Bill Janssen <email@hidden>)
 >Re: can't access 'System Events' because X11Application can't be found? (From: Jeremy Huddleston <email@hidden>)

  • Prev by Date: Re: can't access 'System Events' because X11Application can't be found?
  • Next by Date: Re: how to get bounds of X11 windows using Applescript?
  • Previous by thread: Re: can't access 'System Events' because X11Application can't be found?
  • Next by thread: Re: how to get bounds of X11 windows using Applescript?
  • Index(es):
    • Date
    • Thread