Jump to content

Recommended Posts

Posted

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_InvalidDataType

I want to clear that OutPut, but i dont know how. So... Can you help me ?

Posted

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 ?')

Select

Case $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)

EndSelect

EndFunc

Func 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")

EndFunc

Func run_yahoomail_com()

Dim $acc

_FileReadToArray("acc123.txt",$acc)

Call ("yahoomail_com")

$box= MsgBox(3,'','Save this acc ?')

Select

Case $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)

EndSelect

EndFunc

Func 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")

EndFunc

I 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....

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...