tommytx Posted February 17, 2015 Share Posted February 17, 2015 Can someone help me out here.. what am i doing wrong. $oInputs = _IETagNameGetCollection($oIE, "input") For $oInput In $oInputs if $oInput.name = "q" then msgbox(0,"","Hello Dolly.") if $oInput.name = "q" then $oInput.value = "Goodbye Sally") Next The first command works.. pops up Hello Dolly... but next line fails. I am scanning all input boxes on the page and if one has a name = 'p' then I want to dump the "Goodbye Sally into that input box.. Thanks.. Link to comment Share on other sites More sharing options...
meows Posted February 17, 2015 Share Posted February 17, 2015 (edited) SO sorry i am not smart enough to fill in all the blanks to be able to run that code, all I got was errors.. #include <IE.au3> $oInputs = _IETagNameGetCollection($oIE, "input") For $oInput In $oInputs if $oInput.name = "q" then msgbox(0,"","Hello Dolly.") if $oInput.name = "q" then $oInput.value = "Goodbye Sally") Next 2257 But then I would guess the issue is in the Q "q" if $oInput.name = "q" then $oInput.value = "Goodbye Sally") if $oInput.name = "s" then $oInput.value = "Goodbye Sally") Then that is just a uneducated guess.. "C:\AutoIt3\Code\00_xxxx\xxxxxx\CkPoints\gh.au3"(2,40) : warning: $oIE: possibly used before declaration. $oInputs = _IETagNameGetCollection($oIE, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\AutoIt3\Code\00_xxxxx\xxxxxx\CkPoints\gh.au3"(5,60) : error: syntax error if $oInput.name = "q" then $oInput.value = "Goodbye Sally") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\AutoIt3\Code\00_xxxxxx\xxxxxxxxx\CkPoints\gh.au3"(2,40) : error: $oIE: undeclared global variable. $oInputs = _IETagNameGetCollection($oIE, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\AutoIt3\Code\00_xxxxxxx\xxxxxxx\CkPoints\gh.au3 - 2 error(s), 1 warning(s) 2295 Edited February 17, 2015 by meows Link to comment Share on other sites More sharing options...
Moderators Solution SmOke_N Posted February 17, 2015 Moderators Solution Share Posted February 17, 2015 1. You have a parenthesis at the end of the string "Goodbye Sally") <-- That doesn't belong 2. Are you sure the object has the "value" attribute associated with it? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Gianni Posted February 17, 2015 Share Posted February 17, 2015 also, have a look to the _IEFormElementSetValue() function Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
tommytx Posted February 17, 2015 Author Share Posted February 17, 2015 Thanks Smoke_N... I cannot believe I missed the ) at the end of the line.. sooo... obvious.. makes me feel like a dummy... but thanks again anyway.. And to the other commenters... much appreciated... for you assistance. Link to comment Share on other sites More sharing options...
tommytx Posted February 17, 2015 Author Share Posted February 17, 2015 Meow, Wow.. just noticed all the errors you got... that is weird.. my first part worked fine.. the message popup... only the second command failed the attempt to dump text in an input box named "p" so you might run it again.. mine works perfect now that Smok_N drew my attention the my dumb mistake of adding an extra ) on the end... just curious why your test would be massive errors? Thanks.. Link to comment Share on other sites More sharing options...
kylomas Posted February 17, 2015 Share Posted February 17, 2015 Tommytx - Because $oIE does not exist. Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill 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