sigil Posted April 29, 2008 Share Posted April 29, 2008 After I create an instance of IE using $ieObj=_IECreate("this URL") I want to get the handle for the window that I just opened. I know I can get it by using WinGetHandle("window's title goes here") but I want something more reliable, in case the web page's title changes, or there's more than one window open with that title. Is there a way to use the object to get the window's handle? If it makes things simpler, my goal is to detect whether or not the user has closed the instance of IE made by _IECreate(). Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 29, 2008 Share Posted April 29, 2008 After I create an instance of IE using $ieObj=_IECreate("this URL") I want to get the handle for the window that I just opened. I know I can get it by using WinGetHandle("window's title goes here") but I want something more reliable, in case the web page's title changes, or there's more than one window open with that title. Is there a way to use the object to get the window's handle? If it makes things simpler, my goal is to detect whether or not the user has closed the instance of IE made by _IECreate(). $hIE = _IEPropertyGet($oIE, "hwnd") Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
DarkMatter Posted April 29, 2008 Share Posted April 29, 2008 You can also do WinGetHandle($ieObj)I know that is not documented but if you do that, i.e, it will return 0x000C0646. Then if I do a WinGetHandle on that same window using the title it returns 0x000C0646. [sub]Quantum mechanics: The dreams stuff is made of[/sub] Link to comment Share on other sites More sharing options...
sigil Posted April 29, 2008 Author Share Posted April 29, 2008 Both approaches solve it. Thanks. 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