Jump to content
Sign in to follow this  
boshi

8 digit Alphanumeric Failed to fill form

Recommended Posts

boshi

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

Share this post


Link to post
Share on other sites
boshi

test.au3 (55) : ==> Error parsing function call.:

_IEFormElementSetValue($pass, $Pass[0])

_IEFormElementSetValue($pass, $Pass^ ERROR

Share this post


Link to post
Share on other sites
JohnOne

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.

Share this post


Link to post
Share on other sites
boshi

Are you using IE9?

Nope. I m using IE8

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.

thank you. but it didnt work. just give the same error but the msgbox show the password correctly. but thank you so much

Edited by boshi

Share this post


Link to post
Share on other sites
DaleHohm

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.