Sign in to follow this  
Followers 0
An_icehole

Finding an input pane

6 posts in this topic

I am new to autoit so please can somone help me i have been able to get most things working but this one eludes me .

I am trying to locate 2 buttons on a webpage and send text to them the web page in question is http://omega.darkthrone.com/ in the middle of this page there are 2 buttons which i can get the mouse to click on but i want to find the place and sent a return to login and not use mouseclicks please does anyone know how to locate the 2 buttons and send text to them.

Share this post


Link to post
Share on other sites



IE.au3 Library is the answer

There are 15 great demo/examples of use in my Welcome to Autoit 1-2-3 below ( in my sig )

and / or

the beta of Autoit has IE.au3 examples in the help file

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

thanks they are of great help but i think this particular page is doing somthing strange i cant seek to find object by name

the code goes like this

; Log into dark throne

#include <IE.au3>

$oIE = _IECreate()

_IENavigate($oIE, "http://omega.darkthrone.com/")

; get pointers to the login form and username and password fields

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

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

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

; Set field values and submit the form

_IEFormElementSetValue($o_login, "email")

_IEFormElementSetValue($o_password, "password")

Sleep(2000)

_IEFormSubmit($o_form)

Exit

but i keep getting an error

--> IE.au3 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch

i have looked thru the sourcecode and as far as i can i the name is name

Share this post


Link to post
Share on other sites

I have been looking further into this it seems that most of the examples look for the form name but on this webpage i cant seem to find what the form name is can anybody help .

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I have been looking further into this it seems that most of the examples look for the form name but on this webpage i cant seem to find what the form name is can anybody help .

I am having a similar problem, and the answer DEFINITELY isn't in the help files nor in the auto1-2-3 examples.

So, for example, on the "hotmail login" script,

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

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

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

How did they figure out that the form's name was "f1"? From there, it would be intuitive enough to guess that the form named "login" is the login form. But how did they figure out the parent?

I tried to use _IELinkClickByText. For example, on video.google.com, if I try the _IELinkClickByText to look for "Sign In", it doesn't actually click it!

Edited by J_Y_C

Share this post


Link to post
Share on other sites

you can figue it out in the sourcecode its says name "F1" but on the dt login it does not but i have found a way round it now .

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  
Followers 0