Chimaera Posted March 13, 2015 Share Posted March 13, 2015 Opening a a webcam test like this Local $oIE = _IECreate('http://www.testmycam.net/') Sleep(3000) $WebCamCheck = MsgBox($MB_YESNO + $MB_ICONWARNING + $MB_DEFBUTTON2, 'Webcam Check', 'Did The Webcam Work') _Font() If $WebCamCheck = $IDYES Then GUICtrlSetImage($WebcamIcon, $tick) RegWrite('HKEY_LOCAL_MACHINE\SYSTEM\Setup\Simple', 'Webcam', 'REG_SZ', _Date_Time_SystemTimeToDateTimeStr($CuDate)) ElseIf $WebCamCheck = $IDNO Then GUICtrlSetImage($WebcamIcon, $cross) RegWrite('HKEY_LOCAL_MACHINE\SYSTEM\Setup\Simple', 'Webcam', 'REG_SZ', 'NotCompleted') EndIf Im trying to find a way to make the $WebCamCheck wait until the browser window is closed as the MsgBox appears before the test is barely started I tried adding this after the sleep Local $oIE = _IECreate('http://www.testmycam.net/') Sleep(3000) Local $ProcessCheck = ProcessExists($oIE) ; <<<<<<<<<< this ProcessWaitClose($ProcessCheck) ; <<<<<<<<<<<< this $WebCamCheck = MsgBox($MB_YESNO + $MB_ICONWARNING + $MB_DEFBUTTON2, 'Webcam Check', 'Did The Webcam Work') but it just carry s on and ignores it Any suggestions plz If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
jdelaney Posted March 13, 2015 Share Posted March 13, 2015 $oIE is an object, not a process...get the hwnd, and check if winexists. _IEPropertyGet(,"hwnd") IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Chimaera Posted March 14, 2015 Author Share Posted March 14, 2015 Im at this point but i cant get it to display the consolewrites? Local $oIE = _IECreate('http://www.testmycam.net/') ;~ Sleep(3000) Local $ProcessCheck = _IEPropertyGet( $oIE ,"hwnd") ConsoleWrite($ProcessCheck & @CRLF) Local $IETest = WinExists($ProcessCheck) ConsoleWrite($IETest & @CRLF) If $IETest = 1 Then ProcessWaitClose($ProcessCheck) $WebCamCheck = MsgBox($MB_YESNO + $MB_ICONWARNING + $MB_DEFBUTTON2, 'Webcam Check', 'Did The Webcam Work') am i reading it wrong? If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Chimaera Posted March 16, 2015 Author Share Posted March 16, 2015 Managed to solve this like this in the end Local $oIE = _IECreate('http://www.testmycam.net/') Sleep(300) Local $ProcessCheck = _IEPropertyGet($oIE, "hwnd") WinWaitClose($ProcessCheck) It doesnt allow for errors but thats not critical for this script for me If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() 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