I'm writing a utility that needs to get an enumeration of current open
windows on the desktop. I specifically need to get handles/references
to all windows that have a parent of the root so I can inspect certain
properties they all have.
Does anyone have any clue how to do this or where I can look for more
info? I've scoured the Apple site plus the docs in the developer's
tools.
You can't do this. If you can describe what you're trying to accomplish
with this, perhaps we can suggest a different way to solve the problem.
-Eric
--
Eric Albert ejal...@stanford.edu
http://rescomp.stanford.edu/~ejalbert/
Short answer: I seriously doubt you will be able to do this. That is, I
seriously doubt in MacOS X you will be able to obtain a list of
currently open windows, and query for information about those windows.
--
William Edward Woody - wo...@alumni.caltech.edu
In Phase Consulting - http://www.inphase.org
The PandaWave - http://www.pandawave.com
Macintosh and Microsoft Windows Custom Development
If I can find some way of (a) being notified when any new window is
opened and, (b) getting to the window information and examining the
title.
I was hoping that something in OSX would allow me to do it (like I
mentioned before I can do it in XWindows and M$ Windoze).
I guess my next impossible task is finding a way of forcing all
browser http requests through a local ghost proxy and filtering the
actual HTML content there on the return trip back to the browser.
> I want to write a browser "popup killer" along the lines of the now
> defunct PopupKiller for Windoze. It works by examining the title bar
> of each new window that is opened and matching against a list of
> regular expressions that can be edited by the user.
Just use OmniWeb. In the JavaScript pane of its preferences, there's an
option titled "Scripts are allowed to open new windows:" with the
choices "always", "only in response to a link being clicked", and
"never".
I have no idea why this hasn't made it into things like IE.
> I guess my next impossible task is finding a way of forcing all
> browser http requests through a local ghost proxy and filtering the
> actual HTML content there on the return trip back to the browser.
You don't *force* the requests, you use the built-in browser preferences
and point the browser to your proxy, no impossibility or magic involved.
> In article <be97a6d7.02060...@posting.google.com>,
> tdur...@hotmail.com (Mark Smith) wrote:
>
> > I want to write a browser "popup killer" along the lines of the now
> > defunct PopupKiller for Windoze. It works by examining the title bar
> > of each new window that is opened and matching against a list of
> > regular expressions that can be edited by the user.
>
> Just use OmniWeb. In the JavaScript pane of its preferences, there's an
> option titled "Scripts are allowed to open new windows:" with the
> choices "always", "only in response to a link being clicked", and
> "never".
>
> I have no idea why this hasn't made it into things like IE.
Mozilla has the same feature, as does iCab, leaving IE as the only
widely-used Mac browser that doesn't support it.
/Developer/Applications/Quartz Debug does what you're describing.
Drop me a note on Monday at work, jcr at apple, and I'll ask whether the
API it uses is public or not.
-jcr
Eric Albert <ejal...@stanford.edu> wrote in message news:<ejalbert-1409EF...@usenet.stanford.edu>...
> The reason I'm trying to write my own is that these other browsers'
> solutions to the problem are "all or nothing." I like the regex
> control of PopupKiller so that I see the ones I want and ignore the
> rest.
Well, OmniWeb has the "only in response to clicking on a link" option. I
guess I've never seen a popup I wanted that wasn't in response to
clicking on a link. Anyway, I'm afraid I can't help you with your real
question.
Mark Smith wrote:
>
> The reason I'm trying to write my own is that these other browsers'
> solutions to the problem are "all or nothing." I like the regex
> control of PopupKiller so that I see the ones I want and ignore the
> rest.
Not true for OmniWeb. In OW preferences, under "privacy", you can give
it a list of regex's to avoid. I'm using:
/.*\.doubleclick\.net/
/ads\..*\.com/
/ads\..*\.net/
and it's great to get pages without the banner ads, too.
-jcr