0

As part of a larger solution, I need to detect if any of the running browser instances (IE, FF and Chrome) have my web page currently open. If so, I need to redirect that browser to a different URL within my site.

I'm currently planning to do some PInvoke/Win32 to achieve this; e.g. enumerating through all windows, detecting a browser and then grabbing the address bar and GO button windows to achieve my target, but was wondering if there's an easier route.

dotNET
  • 33,414
  • 24
  • 162
  • 251
  • If you have access to Win32 API, then what you are planning is probably the best option in this case. You can also use other tools like WSH Script and AutoIt. – Amit Mittal May 16 '13 at 10:55
  • 1
    UIAutomation can detect this http://stackoverflow.com/questions/5317642/retrieve-current-url-from-c-sharp-windows-form/5318791#5318791 but its clunky (just as using the native api) and you will have issues updating the url unless you want it in a new tab. Cant you do this with a timed check from the web page to the server or a local server? – Alex K. May 16 '13 at 13:46

0 Answers0