Oldschool Posted November 24, 2007 Share Posted November 24, 2007 (edited) #include <IE.au3> $sUsername = "myLoginName" $sPassword = "myPassword" $oIE = _IECreate("http://mail.google.com") ; get pointers to the login form and username and password fields $oform = _IEFormGetObjByName($oIE, "gaia_loginform") $ologin = _IEFormElementGetObjByName($oform, "Email") $opassword = _IEFormElementGetObjByName($oform, "Passwd") ; Set field values and submit the form _IEFormElementSetValue($ologin, $sUsername) _IEFormElementSetValue($opassword, $sPassword) _IEFormSubmit($oform) _IELoadWait($oIE) Opt("MouseCoordMode", 0) WinActivate("Gmail", "") MouseClick("left", 67, 224);ClickCompose $oForm2 = _IEGetObjById ($oIE, "compose_form") $fMail = _IEFormGetObjByName($oIE, "to") $fSubJect = _IEFormGetObjByName($oIE, "subject") $fBody = _IEFormGetObjByName($oIE, "msgbody") $eMail = "xxxxx@gmail.com" $mySubject = "Test Message" $mBody = "How about them apples" _IEFormElementSetValue($fMail, $eMail) _IEFormElementSetValue($fSubJect, $mySubject) _IEFormElementSetValue($fBody, $mBody) _IEFormSubmit($oForm2) Getting errors: --> IE.au3 V2.3-1 Warning from function _IELoadWait, $_IEStatus_AccessIsDenied (Cannot verify readyState. Likely casue: cross-site scripting security restriction.) --> IE.au3 V2.3-1 Warning from function _IEGetObjById, $_IEStatus_NoMatch --> IE.au3 V2.3-1 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch --> IE.au3 V2.3-1 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch --> IE.au3 V2.3-1 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch --> IE.au3 V2.3-1 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.3-1 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.3-1 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.3-1 Error from function _IEFormSubmit, $_IEStatus_InvalidDataType Edited November 24, 2007 by Oldschool Link to comment Share on other sites More sharing options...
DaleHohm Posted November 24, 2007 Share Posted November 24, 2007 Start by changing _IEFormSubmit($oform) to _IEFormSubmit($oform, 0) to see of the first access is denied error is resolved. (See the remarks in the helpfile for _IEFormSubmit) Then see what other errors you may be left with. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Oldschool Posted November 24, 2007 Author Share Posted November 24, 2007 Thx And Thx for the debug bar, that thig rulezzzzzzzzzzzzzzz 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