How do I get Chrome's current URL now that the Chrome_OmniboxView window class has been removed?

2.4k views Asked by At

I've been using, for a long time, the code FindWindowEx(Hwnd, 0, 'Chrome_OmniboxView', nil) to get the URL from Google Chrome. But suddenly the class Chrome_OmniboxView is no longer avaliable.

I can not find any kind of solution, here or anywhere :( Please, someone have any idea how to get the URL from Chrome in a different way?

1

There are 1 answers

0
user2787809 On

I've just written a Chrome extension to resolve this exact problem. I've put it in the chrome webstore (free) here: https://chrome.google.com/webstore/detail/add-url-to-page-title/ghpeimfjbonkimelnkbgekmcboomkgmi

All it does is to convert the html title of the page to this format: Original Title |url:[http://www.the-url.com]

This is put into the window title by Chrome, which you can read using NativeWIN32.GetWindowText(handle);

Thanks, Simon http://www.xibis.com