bundyxc Posted January 6, 2009 Share Posted January 6, 2009 Has anybody encountered this problem? My program (very simple) sometimes just doesn't load. It doesn't output any errors or anything, it just doesn't launch (until I reboot). Anyone else have this problem? Here's the source (if neccesary). #include <IE.au3> $oIE =_IECreate("http://infiniteadds.com",0,1,1) $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit=_IEGetObjByName($oIE,"action") $oIE = _IEFormElementSetValue ($o_fid, "21802680") $oIE = _IEAction($o_submit,"click") $oIE = _IELoadWait ($oIE) $oIE = _IENavigate($oIE, "http://infiniteadds.org") $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit=_IEGetObjByName($oIE,"action") $oIE = _IEFormElementSetValue ($o_fid, "442500255") $oIE = _IEAction($o_submit,"click") $oIE = _IELoadWait ($oIE) $oIE = _IENavigate($oIE, "http://maxadds.com") $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit=_IEGetObjByName($oIE,"action") $oIE = _IEFormElementSetValue ($o_fid, "21802680") $oIE = _IEAction($o_submit,"click") $oIE = _IELoadWait ($oIE) $oIE = _IENavigate($oIE, "maxadds.com") $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit=_IEGetObjByName($oIE,"action") $oIE = _IEFormElementSetValue ($o_fid, "442500255") $oIE = _IEAction($o_submit,"click") $oIE = _IELoadWait ($oIE) _IEQuit($oIE) Global $arr[2] $arr[0]="hip" $arr[1]="hip" ;^^ hip hip array. ^^ Link to comment Share on other sites More sharing options...
Pain Posted January 6, 2009 Share Posted January 6, 2009 You should a an error handler. $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ...your code here.... Func MyErrFunc() Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) Local $err = $oMyError.number If $err = 0 Then $err = -1 SetError($err) ; to check for after this function returns Endfunc Link to comment Share on other sites More sharing options...
Richard Robertson Posted January 6, 2009 Share Posted January 6, 2009 (edited) It sounds like you may have some hidden IE objects floating around. See if killing all iexplore.exe processes helps. Edited January 6, 2009 by Richard Robertson Link to comment Share on other sites More sharing options...
bundyxc Posted January 6, 2009 Author Share Posted January 6, 2009 Hmm... could I just include that (like.. #include <errorhandler.au3>)? Global $arr[2] $arr[0]="hip" $arr[1]="hip" ;^^ hip hip array. ^^ Link to comment Share on other sites More sharing options...
Pain Posted January 6, 2009 Share Posted January 6, 2009 (edited) Try this, if you want to include the "MyErrFunc" make sure to define $oMyError as global (as seen in my example) expandcollapse popup#include <IE.au3> Global $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") $oIE =_IECreate("http://infiniteadds.com",0,1,1) $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit =_IEGetObjByName($oIE,"action") _IEFormElementSetValue ($o_fid, "21802680") _IEAction($o_submit,"click") _IELoadWait($oIE) _IENavigate($oIE, "http://infiniteadds.org") $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit=_IEGetObjByName($oIE,"action") _IEFormElementSetValue ($o_fid, "442500255") _IEAction($o_submit,"click") _IELoadWait($oIE) _IENavigate($oIE, "http://maxadds.com") $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit=_IEGetObjByName($oIE,"action") _IEFormElementSetValue ($o_fid, "21802680") _IEAction($o_submit,"click") _IELoadWait($oIE) _IENavigate($oIE, "maxadds.com") $o_fid = _IEGetObjByName($oIE,"friendid") $o_submit=_IEGetObjByName($oIE,"action") _IEFormElementSetValue ($o_fid, "442500255") _IEAction($o_submit,"click") _IELoadWait($oIE) _IEQuit($oIE) Func MyErrFunc() Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) Local $err = $oMyError.number If $err = 0 Then $err = -1 SetError($err); to check for after this function returns Endfunc Edited January 6, 2009 by Pain 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