Here is code for retrieving the Current URL from Chrome. I used Deana's excellent example of compiling C# code in-memory so I could create a Method for this purpose.

Jim

Code: Winbatch

;************************************************************************************************************;** This retrieves the Current URL from Chrome Version 35. ;** I know it won't work with 32 (it will with a minor tweak) due to changes somewhere along the way to 35.;** Guessing it will break again soon but offers an approach that could be modified as versions change.;************************************************************************************************************

If!AppExist("chrome.exe",0, 0)ThenDisplay(2,"Note","Chrome is not running.")ExitEndIf

Yeah...I see that on version 35 as well. Bummer...had it working but guess something changed on that front between versions. I'll get it figured out...unless someone beats me to it...I won't be offended if that happens

It says "Chrome is not running" when you switch to a new blank tab, which is sorta true!Otherwise I can't seem to fool it. I'll let it run all day. I changed the main program slightlyso I could resize a window to the bottom of the screen and leave it there. The popup displaybox was stealing focus.

I think I know what is causing that problem and will update things again a bit later. One of the problems when one steals code that one doesn't fully understand. I think I'm figuring it out though. I believe it is related to the regex stuff which I am going to remove.

Glad to hear it. I'm still working on the situation where it is a local file (which is now working. It was the regex stuff as I thought) and now I need to fix it so that it recognizes when it is running but no URL is present. I guess the easiest approach would use AppExist to make sure it is running and then the blank URLs become a moot point.

I've changed the code above, hopefully for the last time. Seems like no matter how much testing I do I usually miss something obvious but maybe I got it right this time. Not sure how long before a new version will break it but maybe someone will find it useful.