Jump to content

Need help with a form control in IE


kiu
 Share

Recommended Posts

Hi

I'm trying to click a button wich controls a form.

I have an embedded IE

I think the html source for my button is

<INPUT class=button2 value=Dificil type=submit name=dif3>

I use this to get informations about my button,

$oInputs = _IETagNameGetCollection ($oIE, "input")
$x = 0


For $oInput In $oInputs
    MsgBox(0, "Form Input Type", "x = " & $x & "Form: " & $oInput.form.name & " Type: " & $oInput.type & " html: " & $oInput.outerhtml)
    $x += 1
Next

but I don'n know how to activate it;

I have tried with

$oForm = _IEFormGetCollection($oIE, 3)

_IEFormSubmit ($oForm)

but I don't know how to use _IEFormGetCollection here.

If you can give me an example, or advice, I will bw very pleased.

ps: sorry for my englih :D

Paul

Link to comment
Share on other sites

Are there any errors? Is there any more code? What are you attempting to automate? I assume you probably don't have SciTe- look for the link in my sig.

Cheers,

Brett

Oh and welcome to the forums btw.

Link to comment
Share on other sites

I want to autologin in this site:

My Site

I try to fill the login form and activate Login button

I started to code a bot, and I can't activate any of that kind of button, like that in Login form

The code from my bot is big, and you can't use it if you don't have an account to that web-game.

I can activate some buttons inside the site using

_IENavigate($oIE, $url, 0)
 $oForm = _IEFormGetCollection($oIE, 3)

 _IEFormSubmit($oForm)

I just discovered that using 3 in _IEFormGetCollection($oIE, 3) work,

Link to comment
Share on other sites

I tried something like this

#include <IE.au3>

$oIE = _IECreate()

_IENavigate($oIE, "http://s1.bitefight.de/bite/login.php")

$o_form = _IEFormGetObjByName($oIE, "l")

$o_login = _IEFormElementGetObjByName($o_form, "user")

$o_password = _IEFormElementGetObjByName($o_form, "pass")

_IEFormElementSetValue($o_login, "username")

_IEFormElementSetValue($o_password, "password")

_IEFormSubmit($o_form)

Exit

but didn't succeed

Link to comment
Share on other sites

  • 3 weeks later...

*bump*

I am having troubles here as well.

Problem is that the form has no name?! what do you do in this case?

example:

#include <IE.au3>

$oIE = _IECreate ("http://www.google.com")

$oForm = _IEFormGetObjByName ($oIE, "f")

$oQuery = _IEFormElementGetObjByName ($oForm, "q")

_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")

_IEFormSubmit ($oForm)

_IEFormGetObjByName doesn't work because the form here has no name.

"Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType" nothing i can do :D

any ideas?

Link to comment
Share on other sites

@kiu please read the remarks section of _IEFormSubmit in the helpfile

@Consty I don't know where to begin... pile onto someone elses thread with a new question and then bump it? get real - open your own thread, but first spend some time in the helpfile... read the remarks for _IEFormElementGetObjByName and examine all of the console output in SciTe for clues

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...