Jump to content
Sign in to follow this  
jlorenz1

Special kind of submit button?

Recommended Posts

jlorenz1

Hi, it is a very simple script. I can paste an entry in $o_spendenlink, but can't start the submit button, even the return value is -1. The submit-button has the Label "EINTRAGEN". If the submit button works correct, you'll get a notification above on the website.

Relevant HTML-code is this:

<form method="POST" action="" name="eintragen">

<center><input class="buttonsubmit" type="submit" value="Eintragen" name="submit" onclick="this.value = 'Bitte Warten'"><br>

What is wrong in my script? Thanks in advance Johannes from Germany

#include <IE.au3>
$sRefLink = 'http://muenchen.pennergame.de/change_please/3766888/'
$iVisible = 1
; Create a browser window and navigate to multispende.net
$oIE = _IECreate ('http://www.multispende.net/spendenlink-eintragen.html', 0, $iVisible)
WinSetState ('multispende.net', '', @SW_MAXIMIZE)
$o_form = _IEFormGetObjByName ($oIE, 'eintragen')
$o_spendenlink = _IEFormElementGetObjByName ($o_form, 'reflink')
_IEFormElementSetValue ($o_spendenlink, $sRefLink)

$aa=_IEFormSubmit ($o_form,4)
MsgBox(0, 'Result', 'Return Value of IEFormSubmit:' & $aa)
Edited by jlorenz1

Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]

Share this post


Link to post
Share on other sites
mailmaster

Hi, it is a very simple script. I can paste an entry in $o_spendenlink, but can't start the submit button, even the return value is -1. The submit-button has the Label "EINTRAGEN". If the submit button works correct, you'll get a notification above on the website....

...
$aa=_IEFormSubmit ($o_form,4)
MsgBox(0, 'Result', 'Return Value of IEFormSubmit:' & $aa)

Maybe
$aa=_IEFormSubmit ($o_form,4)
-->
$aa=_IEFormSubmit ($o_form,1)
as you can read in the help file:

$f_wait [optional] specifies whether to wait for page to load before returning
0 = Return immediately, not waiting for page to load
1 = (Default) Wait for page load to complete before returning

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.