Prev: Changing removable disk label
Next: FileName from HWND
From: Grzegorz on 21 Apr 2006 07:10 J French wrote: > On Fri, 21 Apr 2006 10:51:04 +0200, =?ISO-8859-2?Q?Grzegorz_Wr=F3bel?= > </dev/null(a)localhost.localdomain> wrote: > > >>J French wrote: >> >>>I think I can see what might be going on, 'Learner' is running his App >>>off a network drive (or possibly CD ROM) >>> >>>The local system is completely locked down, possibly 'virtual', >>>possibly 'unknown', possibly 'self restoring'. >>> >>>I think Mayana's Windows snooping solution is the best idea. >>>Here is a simple Snooper that I use for determining whether something >>>is 'painted' or a control ( I don't have Firefox so I'm not sure >>>whether it is easy to interrogate) :- > > >>I have Firefox among other browser installed and a quick look in Spy++ >>reveals that the problem here is that practically all Firefox's "controls" >>are titless "MozillaWindowClass" and "MozillaDropShadowWindowClass" >>top-level windows. This mess is most likely the result of portability issues >>ad the fact that this browser has not been designed for a particular platform. >>Even if you isolate the proper window for once by monitoring window >>messages it will be hard to build a simple algorithm that finds this specific window. > > > Hmm ... > > Maybe some other info on the Window > > GetWindowContextHelpId > GetClassName - we've tried that > GetWindowLong - and look at GWL_STYLE and GWL_EXSTYLE > > There must be something (or some combination of things) that are > unique about that Window If the OP's is going to use this approach, finding something unique about that window is the way to go. But that's the OP's homework. Then, there still will be a need to face a problem of retrieving the actual url text, since it is not standard combobox. Looks like quite a lot of ugly, hacking job, for the simple thing. -- 677265676F727940346E6575726F6E732E636F6D
From: J French on 21 Apr 2006 08:45 On Fri, 21 Apr 2006 13:10:56 +0200, =?ISO-8859-1?Q?Grzegorz_Wr=F3bel?= </dev/null(a)localhost.localdomain> wrote: <snip> >If the OP's is going to use this approach, finding something unique about that window is the way to go. But that's the OP's homework. >Then, there still will be a need to face a problem of retrieving the actual url text, since it is not standard combobox. >Looks like quite a lot of ugly, hacking job, for the simple thing. Have you waved my Window From Point sniffer over the Firefox URL dropdown Edit I don't really want to install FireFox myself
From: mayayana on 21 Apr 2006 09:26 > Here is a simple Snooper that I use for determining whether something > is 'painted' or a control ( I don't have Firefox so I'm not sure > whether it is easy to interrogate) :- > That's a clever little gizmo. It doesn't show anything over Firefox, though, except for the extra title bar text. I've never understood why it's so hard to track Windows with the API, but it does seem to be limited. I posted the Active Accessibility info. because the only hWnd with Firefox's address bar is several levels up. AA identifies several controls but they're all within the same hWnd. I don't know what sort of API is inside AA's oleacc.dll, but it can read virtually anything if one is willing to write enough code.
From: mayayana on 21 Apr 2006 09:39 > > > > Alf's response consisted of a 1-line wisecrack > > and a 4-line cranky complaint about posting format. > > I was thinking it was *that* sort of thing that doesn't > > often show up here. > > The "1-line wisecrack" pinpointed an obvious fact, the OP seemed to be missing, that if you can execute your code on a machine you can do almost everything and that may include installation of some of application's components. It's another story that any solution that does not require that is much better. > The OP had already made clear that he wanted a Windows approach, not a Mozilla approach. Maybe he hasn't thought it through, but I didn't see any reason to assume that. It just made sense to me that he's programming in Windows...he wants a window property...he shouldn't have to get into some 3rd-party API - and support files - to get that. > "4-line cranky complaint about posting format" is actually his signature. It seems to some it can be as annoying as top posting can be for others, but I quess it's a purpose of it. > Signature or not, he put it into his post. It reminds me of the old "Thank you for not smoking". A passive-aggressive confrontation that says, "Not only will I not relate to your smoking, but I also won't relate to you, your aggression, or my aggression." It's the sort of thing one usually only sees on Linux groups where the posters are all short on sunlight and sleep. :) _______________________________________ Please respect the newsgroup rules and tell me that my post is brilliant. Oh...and send money if you can. _______________________________________
From: Alf P. Steinbach on 21 Apr 2006 10:17
* mayayana: > > The OP had already made clear that he wanted a Windows > approach, not a Mozilla approach. Maybe he hasn't thought it > through, but I didn't see any reason to assume that. It just > made sense to me that he's programming in Windows...he > wants a window property...he shouldn't have to get into some > 3rd-party API - and support files - to get that. A few incorrect assumptions: (1) that a pure general Windows approach is all that's required to interrogate a specific process' state, (2) that an application-specific approach is necessarily implied by using the access you have when running as a Windows application, (3) that Firefox' current URL is available as some kind of API-level window property. I'll refrain from listing the incorrect, wishful assumptions relating to motivations and so on. Incorrect assumption (1) is perhaps the easiest to comprehend the incorrectness of. Where do you draw the line about using application-specific knowledge? What is "allowed", in your view? And, importantly, can you demonstrate that that's enough for the Firefox URL? Note that /some/ application-specific knowledge is required however you do this, so you have some very arbitrary line drawn somewhere. >> "4-line cranky complaint about posting format" is actually his signature. > It seems to some it can be as annoying as top posting can be for others, but > I quess it's a purpose of it. > Signature or not, he put it into his post. As noted in another current c.o.m-w.p.win32 thread, where someone asked for permission to also use the signature, that signature has been adopted in at least one FAQ for how to post on certain groups, so it's not the case that people generally find it disagreeable. You, personally, disagree with my signature, fine. You label it is a cranky comment about posting format that I used instead of a proper reply, suppressing the fact that it's a signature and adding emotional content that you have no basis for inferring: that's absolutely not fine, that's intentional misrepresentation, unless you don't know what a signature is, which I don't believe. Having said that, back to the technical. Your idea of using accessibility was ingenious, and could have worked. However, it seems that Firefox 1.5* does not yet support Windows accessibility. At least, the Windows built-in "Joe" speaks only the window title and nothing of the contents (note to those who'd like to experiment: just using that thing messed up my toolbar icons...). I guess if disk access is prohibited (e.g., there is no local disk) then one way to proceed technically could be to infuse a DLL into the Firefox process. But the same thing could be achieved much more easily using a Firefox extension -- one would just have to convince the IT department to install that extension. I interpret the OP's reluctance to discuss these environmental issues as a sign that the question is really about cracking: there, now I've brought it out into the open. -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? |