Jump to content
Sign in to follow this  
jimmyjmmy

How do I fill up ladbrokes registration form

Recommended Posts

jimmyjmmy

Hi,

I wish to fill up the registration form of ladbrokes.com but I was not successful. Can someone help me. My script below.

;;;;; my not working script;;;;;;;;;;;;;

#include <IE.au3>

$lad_url = _IECreate("https://www.ladbrokes.com/lbr_portal?action=go_register&casino_aff=default&system_source=Cas&AFF_ID=&bfmid=&bfid=&SC=&InstantPlay=Lobby&return_url=http://casino.ladbrokes.com/en?LANG=en&system_source_id=OCC_WEB")

WinWaitActive("Registration page - Windows Internet Explorer","Registration page - Windows Internet Explorer")

$firstname_form = _IEGetObjByName ($lad_url, "fname")

$firstname_value = "firstname"

_IEFormElementSetValue ($firstname_form, $firstname_value )

Share this post


Link to post
Share on other sites
Andreik

Maybe is more good to use _IELoadWait and then WinWaitActive.


When the words fail... music speaks

Share this post


Link to post
Share on other sites
SoulA

Got this pretty much from help file.

#include <IE.au3>

$sURL = "https://somesite.com"

$oIE  = _IECreate($sURL)
$oForm  = _IEFormGetObjByName($oIE, "Registration Form")    ;put the name of the form here look at page source
$oQuery  = _IEFormElementGetObjByName($oForm, "fname")      ;put the name of the id you want to fill in the form
_IEFormElementSetValue($oQuery, "firstname")                ;fill in that element with whatever you want
_IEFormSubmit($oForm)                                       ;when everythings doen submit

Share this post


Link to post
Share on other sites
jimmyjmmy

Got this pretty much from help file.

#include <IE.au3>

$sURL = "https://somesite.com"

$oIE  = _IECreate($sURL)
$oForm  = _IEFormGetObjByName($oIE, "Registration Form")    ;put the name of the form here look at page source
$oQuery  = _IEFormElementGetObjByName($oForm, "fname")      ;put the name of the id you want to fill in the form
_IEFormElementSetValue($oQuery, "firstname")                ;fill in that element with whatever you want
_IEFormSubmit($oForm)                                       ;when everythings doen submit
Ok, Thanks. I followed the above and I got it working, Thanks.

Can someone explain to me why the script below can fill up the forms in yahoo (when $switch = 0) but not in Ladbrokes ($switch = 1)

Thanks

;;;; my script ;;;;;;;;;;;;;;;;;

#include <IE.au3>

$switch = "1" ; to select either to go Ladbrokes or yahoo

If ($switch = "1") Then

$sURL = "https://www.ladbrokes.com/lbr_portal?action=go_register&casino_aff=default&system_source=Cas&AFF_ID=&bfmid=&bfid=&SC=&InstantPlay=Lobby&return_url=http://casino.ladbrokes.com/en?LANG=en&system_source_id=OCC_WEB"

$oIE = _IECreate($sURL)

$firstname = _IEGetObjById($oIE,"fname")

_IEFormElementSetValue($firstname, "firstname")

Else

$sURL = "mail.yahoo.com"

$oIE = _IECreate($sURL)

$firstname = _IEGetObjById($oIE,"username")

_IEFormElementSetValue($firstname, "firstname")

EndIf

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  

×