0

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?

Rob Kennedy
  • 161,384
  • 21
  • 275
  • 467
Guybrush
  • 1,575
  • 2
  • 27
  • 51
  • 1
    What have you tried? Any luck with Spy++ or finding an API? Chrome is moving away from Windows controls. I'd start looking if they have some API for this. – Jeroen Wiert Pluimers Aug 29 '13 at 08:07
  • See also http://stackoverflow.com/questions/18431396/the-class-chrome-omniboxview-is-no-longer-available?rq=1 – Rob Kennedy Aug 29 '13 at 12:35
  • Seems like you could [write a Chrome extension that reads the current URLs](http://stackoverflow.com/q/10413911/33732), and then [communicate that information to your program](https://groups.google.com/a/chromium.org/forum/m/#!topic/chromium-extensions/FSVZah2ZPBo). – Rob Kennedy Aug 29 '13 at 12:58
  • Jeroen, the class Chrome_OmniboxView was removed. See this link: https://code.google.com/p/chromium/issues/detail?id=246644 – Guybrush Aug 29 '13 at 14:39
  • Rob, yes, I already see this and other questions about this problem here in StackOverFlow, but none have a solution :( – Guybrush Aug 29 '13 at 14:42
  • Rob, thank you, I will have a look in this solution. If someone have another idea, please let me know! Thank you! – Guybrush Aug 29 '13 at 14:42
  • Can you use UIAutomation? http://msdn.microsoft.com/en-us/library/ms747327.aspx – Piotr Stapp Sep 02 '13 at 08:41

1 Answers1

2

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