kctvt Posted September 13, 2009 Posted September 13, 2009 When we run a programe, if got error, OutPut'll open and let us know about that error.EX:>"D:\Programes\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Admin\Desktop\Test0001.au3" --> IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType--> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataTypeI want to clear that OutPut, but i dont know how. So... Can you help me ?
jvanegmond Posted September 13, 2009 Posted September 13, 2009 Once the output is out, it's out. The only thing you can do is stop it from displaying in the first place. The function _IEErrorNotify can disable or enable debugging output from the IE library. github.com/jvanegmond
kctvt Posted September 13, 2009 Author Posted September 13, 2009 This's my test code. #include <IE.au3>#include <File.au3>#include <Array.au3>$user = "Emailtest"$pass = "passsssss"Call ("run_yahoomail_com")Call ("run_gmail_com")Func run_gmail_com()Dim $acc_FileReadToArray("acc123.txt",$acc)Call ("gmail_com")$box= MsgBox(3,'','Save this acc ?')SelectCase $box=7 Call("run_gmail_com")Case $box=6 _ArrayAdd($acc,"Web : http://gmail.com/") _ArrayAdd($acc,"Username : "&$user) _ArrayAdd($acc,"Password : "&$pass) _ArrayAdd($acc,"= = = = = = = = = = = = = = = = = ") _FileWriteFromArray("acc123.txt", $acc, 1) Sleep(1000)Case $box=2 MsgBox(4096, "Notice", "Error. I'll quit this func and run next Func") filewrite("C:\Documents and Settings\Admin\Desktop\Super Test\log1.txt","http://gmail.com/ error ") _IEErrorNotify (False)EndSelectEndFuncFunc gmail_com()$oIE = _IECreate ("http://www.gmail.com")$o_form = _IEFormGetObjByName ($oIE, "gaia_loginform0") $o_login = _IEFormElementGetObjByName ($o_form, "Email")$o_password = _IEFormElementGetObjByName ($o_form, "passwd")$o_signin = _IEFormElementGetObjByName ($o_form, "signIn")_IEFormElementSetValue ($o_login, $user)_IEFormElementSetValue ($o_password, $pass)_IEAction ($o_signin, "click")EndFuncFunc run_yahoomail_com()Dim $acc_FileReadToArray("acc123.txt",$acc)Call ("yahoomail_com")$box= MsgBox(3,'','Save this acc ?')SelectCase $box=7 Call("run_yahoomail_com")Case $box=6 _ArrayAdd($acc,"Web : http://yahoomail.com/") _ArrayAdd($acc,"Username : "&$user) _ArrayAdd($acc,"Password : "&$pass) _ArrayAdd($acc,"= = = = = = = = = = = = = = = = = ") _FileWriteFromArray("acc123.txt", $acc, 1) Sleep(1000)Case $box=2 MsgBox(4096, "Notice", "Error. I'll quit this func and run next Func") filewrite("C:\Documents and Settings\Admin\Desktop\Super Test\log1.txt","http://yahoomail.com/ error") _IEErrorNotify (False)EndSelectEndFuncFunc yahoomail_com()$oIE = _IECreate ("http://www.yahoomail.com")$o_form = _IEFormGetObjByName ($oIE, "login_form0") $o_login = _IEFormElementGetObjByName ($o_form, "login")$o_password = _IEFormElementGetObjByName ($o_form, "passwd") $o_signin = _IEFormElementGetObjByName ($o_form, ".save") _IEFormElementSetValue ($o_login, $user)_IEFormElementSetValue ($o_password, $pass)_IEAction ($o_signin, "click") EndFuncI plan if code error, i'll click cancel. And this error web'll be saved to log1.txt . I'll chose "cancel" button when I see the OutPut have error.After chose cancel, the programe'll run the next Func and clear the Output.I plan that. but dont know how....
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