Jump to content

How to Read elemen ID for website using Autoit ?


Recommended Posts

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
Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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. 

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...