BreCalmor Posted November 15, 2008 Share Posted November 15, 2008 (edited) If the IE window identified by $oIE is closed by someone or something, I would like the script to exit. Any help would be appreciated. Thanks, Bre Edited November 16, 2008 by BreCalmor Link to comment Share on other sites More sharing options...
Josbe Posted November 15, 2008 Share Posted November 15, 2008 If the IE window identified by $oIE is closed by someone or something, I would like the script to exit.Any help would be appreciated.Thanks,BreAlgorithm: While (mywindows exists) myactions here...WEndExit AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
BreCalmor Posted November 16, 2008 Author Share Posted November 16, 2008 So, how do I figure if it exists? Probably something to do with the windows handle, but a search through the help and udf help didn't come up with anything I thought would work. Bre Link to comment Share on other sites More sharing options...
Dinosaurr Posted November 16, 2008 Share Posted November 16, 2008 (edited) If ProcessExists("process") Then Actionshere Else Exit EndIf Edited November 16, 2008 by Dinosaurr Link to comment Share on other sites More sharing options...
BreCalmor Posted November 16, 2008 Author Share Posted November 16, 2008 If ProcessExists("process") Then Actionshere Else Exit EndIfThis requires a name or a pid. I will have a multiple IE windows open with the same title. So how do I find the PID if all I have is the hwnd? Link to comment Share on other sites More sharing options...
AzKay Posted November 16, 2008 Share Posted November 16, 2008 WinExists? Didnt look too well into the helpfile. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
BreCalmor Posted November 16, 2008 Author Share Posted November 16, 2008 WinExists? Didnt look too well into the helpfile.Which part of "I will have a multiple IE windows open with the same title." did you miss.Identifying a specific IE window by title WON'T WORK.Next... Link to comment Share on other sites More sharing options...
Josbe Posted November 16, 2008 Share Posted November 16, 2008 In my helpfile I have this (under IE management UDF): _IEPropertyGet($oIE, "hwnd") AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
AzKay Posted November 16, 2008 Share Posted November 16, 2008 (edited) Which part of helpfile did you miss?EDIT::MsgBox(0, "", WinExists(WinGetHandle(""))) Edited November 16, 2008 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
BreCalmor Posted November 16, 2008 Author Share Posted November 16, 2008 (edited) In my helpfile I have this (under IE management UDF): _IEPropertyGet($oIE, "hwnd")True, which is what I have, but nothing to do with it... I don't see a function that checks the existence of an application by hwnd, only by exe, pid, title or what not. If I could figure out a way to get the PID for a particular HWND, then the problem would be solved. Which part of helpfile did you miss? EDIT:: MsgBox(0, "", WinExists(WinGetHandle("")))WinGetHandle ( "title" [, "text"] ) I will have a multiple IE windows open with the same title.Guess I don't need to say any more... Wanna try again, or are you going to actually read my post? Edited November 16, 2008 by BreCalmor Link to comment Share on other sites More sharing options...
AzKay Posted November 16, 2008 Share Posted November 16, 2008 (edited) I guess you didnt try out my example. How about you TRY it first?EDIT::Heres a tip. REPLACE THE WINGETHANDLE, TO THE IE HANDLE?MAGIX? Edited November 16, 2008 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
BreCalmor Posted November 16, 2008 Author Share Posted November 16, 2008 I guess you didnt try out my example. How about you TRY it first? EDIT:: Heres a tip. REPLACE THE WINGETHANDLE, TO THE IE HANDLE? MAGIX?I didn't try it out, sorry. According to the help file, it shouldn't have worked. I did see your edit and tried it: $oIE = _IECreate ($sWebSite, 0, 1, 1, 1) $hWnd_Active = _IEPropertyGet($oIE, "hwnd") While WinExists ($hWnd_Active) ; All the program stuff WendThis does appear to work, although I don't know why. The help file doesn't say you can use a hwnd, and you didn't say you could. Sorry to have doubted, but maybe explaining it a little would have made more sense. Thank you for your help and solution !! Link to comment Share on other sites More sharing options...
AzKay Posted November 16, 2008 Share Posted November 16, 2008 Anytime. # MY LOVE FOR YOU... IS LIKE A TRUCK- # 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