BreCalmor Posted November 8, 2008 Share Posted November 8, 2008 (edited) The reason is because I want to run my script using specific URLs even though the website title is the same. I tried WinActive ($sWinTitle) but when the other window is up, the script continues, even though it shouldn't. I tried using _IEPropertyGet ($oIE, "locationurl") to try to use the URL (which is different for each window). Using the URL would work, but how do I check the URL of the window, if its active, without using the window object? I thought of this function, $hWnd_Active = _IEPropertyGet($oIE, "hwnd"), but I wasn't sure really what to do with the window handle to check the URL? I don't know, I didn't think it would be a big deal, but I am out of ideas. Anyone? Thanks, Bre Edited November 8, 2008 by BreCalmor Link to comment Share on other sites More sharing options...
DexterMorgan Posted November 8, 2008 Share Posted November 8, 2008 (edited) The reason is because I want to run my script using specific URLs even though the website title is the same. I tried WinActive ($sWinTitle) but when the other window is up, the script continues, even though it shouldn't. I tried using _IEPropertyGet ($oIE, "locationurl") to try to use the URL (which is different for each window). Using the URL would work, but how do I check the URL of the window, if its active, without using the window object? I don't know, I didn't think it would be a big deal, but I am out of ideas. Anyone? Thanks, Bre something like this? $x = ControlGetText('Title of window Goes here','','[CLASS:Edit; INSTANCE:1]') if $x = 'url' then ;something elseif $x = 'someotherurl' ;something else endif It works for me with IE Edited November 8, 2008 by DexterMorgan code Link to comment Share on other sites More sharing options...
Valuater Posted November 8, 2008 Share Posted November 8, 2008 You can get the handle of the IE window to use with the Win* functions like this. _IEPropertyGet($oIE, "hwnd") 8) Link to comment Share on other sites More sharing options...
BreCalmor Posted November 8, 2008 Author Share Posted November 8, 2008 something like this? $x = ControlGetText('Title of window Goes here','','[CLASS:Edit; INSTANCE:1]') if $x = 'url' then ;something elseif $x = 'someotherurl' ;something else endif It works for me with IEI don't understand it, but it worked !! Thanks !! Bre Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now