Click to See Complete Forum and Search --> : Google CHrome URI


tolaipner
February 13th, 2010, 02:30 PM
Hello,

I know that it's possible to get URI from Google Chome address bar, by finding address bar handle, but how I can check if user is writing something in the address bar at the moment? Is it posible to get focused object handle and compare with address bar handle?

Senith
February 13th, 2010, 05:56 PM
Well you can extract the text from it. I was able to do the same with another browser in VB6. So if its can be done in VB it should be done in C++ too.

If you wan't I can try to find the VB code and maybe it can be converted into C++ code.

tolaipner
February 14th, 2010, 10:29 AM
Well you can extract the text from it. I was able to do the same with another browser in VB6. So if its can be done in VB it should be done in C++ too.

If you wan't I can try to find the VB code and maybe it can be converted into C++ code.

I know that you can get text from address bar, I've already done that. But what if user is writing somenthing in the address bar when I'm getting text?

srelu
February 14th, 2010, 03:00 PM
I'm unfamiliar with the Chrome UI, but it must work the same way the IE do, so I think it won't be a problem to translate it into the case of Chrome.

What you need is to intercept the clicks on the "Go" button and keyboard messages. When the user finishes typing he will click that button or hit the Enter key. That's the signal that editing of the address is finished.

So, if the last pressed key is Enter (or a click on "Go") he's is not typing. If the last pressed key is one of the characters accepted in an URI, he's just typing.

To get the keyboard and mouse messages, you can use a hook or window subclassing.