Extract to var online price Value from Website

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Rhaziel
Posts: 2
Joined: 21 Dec 2020, 04:20

Extract to var online price Value from Website

21 Dec 2020, 04:31

Hello! I hope someone can help me with this.

I'm creating a kind of widget which shows the current price of a crypto coins.

The problem is know how to get that price from a webpage.. I imagine is not so simple like paste a magic url Link. Maybe some way to get the value from the Div Class or opening the web browser in hide mode..

I leave attached a Picture of the value I need. I need to store it in a AHK Var.

Thanks in advance!!! :wave:
Attachments
price.png
price.png (103.96 KiB) Viewed 379 times
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: Extract to var online price Value from Website

21 Dec 2020, 06:35

I dont think winhttp will work for that because the way the price shows up (JS). That site is also not supported by IE. So maybe try chrome.ahk
User avatar
Jovannb
Posts: 268
Joined: 17 Jun 2014, 02:44
Location: Austria

Re: Extract to var online price Value from Website

23 Dec 2020, 02:51

Hi

this are (fragments) of what works for me

Code: Select all

wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := false ; false to not see the window
wb.Navigate("www.aaa.bc/nix?lic=xxxx_yyyybludenz&layout=board&username=beeper&password=zzzz")


While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy 	; wait till page is loaded alreay
   sleep 100


 LTabText := wb.document.documentElement.innerText
then search in that variable LTabText what your are looking for

regards

J.B.
AHK: 1.1.37.01 Ansi, 32-Bit; Win10 22H2 64 bit, german

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: apeironn, Google [Bot], peter_ahk and 331 guests