boshi Posted July 16, 2011 Share Posted July 16, 2011 Hello fellow Autoit programmers I am using the code below. 1st and 2nd line open the file 3rd and 4th line read the email from the text file 5th and 6th line read the password which is 8 digit alphanumeric like: g30994zw 7th line i add to see the password 8th and 9th line fill in form in IE for the email 10th and 11th line fill the password $account = FileOpen("emaillist.txt", 0) $passfile = FileOpen("passlist.txt", 0) $Line = FileReadLine($account) $Email = StringRegExp($Line, "(.+@.+\..+)", 1) $Line2 = FileReadLine($passfile) $Pass = StringRegExp($Line2, "(.*)", 1) MsgBox(4096, "", $Pass[0]) $login = _IEGetObjByName($ie, "email") _IEFormElementSetValue($login, $Email[0]) $pass = _IEGetObjByName($ie, "pass") _IEFormElementSetValue($pass, $Pass[0]) problem: the password is correct from the MsgBox but i got error when it comes to fill in the form Link to comment Share on other sites More sharing options...
JohnOne Posted July 17, 2011 Share Posted July 17, 2011 "but i got error" What error? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
boshi Posted July 17, 2011 Author Share Posted July 17, 2011 test.au3 (55) : ==> Error parsing function call.: _IEFormElementSetValue($pass, $Pass[0]) _IEFormElementSetValue($pass, $Pass^ ERROR Link to comment Share on other sites More sharing options...
taietel Posted July 17, 2011 Share Posted July 17, 2011 Are you using IE9? Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
JohnOne Posted July 17, 2011 Share Posted July 17, 2011 Might be that the var contains a carraige return of some sort. Try $Pass = StringStripCR($Line2) instead of $Pass = StringRegExp($Line2, "(.*)", 1). Or it could be your pattern, I dont know about rexexp, but if you are capturing everything, what is the point, and if thats a non capturing groep, same. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
boshi Posted July 17, 2011 Author Share Posted July 17, 2011 (edited) Are you using IE9?Nope. I m using IE8Might be that the var contains a carraige return of some sort.Try $Pass = StringStripCR($Line2) instead of $Pass = StringRegExp($Line2, "(.*)", 1).Or it could be your pattern, I dont know about rexexp, but if you are capturing everything, what is the point, and if thats a non capturing groep, same.thank you. but it didnt work. just give the same error but the msgbox show the password correctly. but thank you so much Edited July 17, 2011 by boshi Link to comment Share on other sites More sharing options...
jaberwacky Posted July 17, 2011 Share Posted July 17, 2011 I don't automate with IE very often but I'm willing to bet that a password field can not be pasted into by anything other than a manual paste. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
DaleHohm Posted July 17, 2011 Share Posted July 17, 2011 I think you are having variable name collision. Change $pass or $Pass to something else. 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...
jaberwacky Posted July 17, 2011 Share Posted July 17, 2011 DOH! Good eye. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? 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