Jump to content
Sign in to follow this  
Tripoz

How to Read elemen ID for website using Autoit ?

Recommended Posts

Tripoz

Hello guys,

i just one to Showup the elemen from my Screenshot (its called spot) to msgbox, but its not work.

can anyone help me to read the element that i need in my Screenshot ? (in blue box)

its only result : "0"

 

Thankyou very much

here is my code:

---edited---

 

 

Edited by Tripoz

Share this post


Link to post
Share on other sites
Danp2

Your script is a complete mess. :think:  Can't test this right now, but I would try something like this:

#Include <IE.au3>

$oIE = _IECreate('https://www.binary.com/c/trade.cgi?market=random&time=5m&form_name=touchnotouch&expiry_type=duration&amount_type=stake&H=%2B9.63&currency=USD&underlying_symbol=R_100&amount=1&date_start=now&type=ONETOUCH&l=EN')

$oSpan = _IEGetObjById($oIE, "spot")

While 1
    ConsoleWrite("Result = " $oSpan.InnerHTML & @CRLF)
    Sleep(1000)
WEnd

 

Share this post


Link to post
Share on other sites
Tripoz

Your script is a complete mess. :think:  Can't test this right now, but I would try something like this:

---edited---

thx bro...sorry for mess code (im trying to learn autoit)

but why i got error message like this?

"C:\.....\teselemen.au3" (8) : ==> Variable must be of type "Object".:
ConsoleWrite("Result = "& $oSpan.InnerHTML & @CRLF)
ConsoleWrite("Result = "& $oSpan^ ERROR

Edited by Tripoz

Share this post


Link to post
Share on other sites
Danp2

btw im still got error code:

"C:\.....\teselemen.au3" (8) : ==> Variable must be of type "Object".:
ConsoleWrite("Result = "& $oSpan.InnerHTML & @CRLF)
ConsoleWrite("Result = "& $oSpan^ ERROR

the very first when i run the code is Working, but after that i got that error...could you help me with that error?

If it works the first time, then I'd suggest moving the _IEGetById line so that it is the first line in your While loop.

P.S. Please keep discussion here rather than PM. That way others can benefit and you are more likely to get assistance from others. 

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  

×