Noddle Posted September 10, 2015 Share Posted September 10, 2015 (edited) HiI'm wanting to get the rate of the exchange from this site, ( aus / php )http://blog.orbitremit.com/a-currency-exchange-rate-calculator-that-will-save-you-money/ ( Calculator )orhttp://blog.orbitremit.com ( today's exchange rate )but to see the 'rate' you click the button (Calculator / Top right)I think it's java or something else,HTML / Java are not my strong point,I wonder if someone who's bored can have a look and whip me up some code to get the values,I can phrase it or what ever on the returned data, but I have no idea how to get the data to start with,thanks for any help, or even pointersI played with _IEBodyReadHTML & _IEDocReadHTML but it does not brig back anything I'm afterNigel Edited September 10, 2015 by Noddle Link to comment Share on other sites More sharing options...
Celtic88 Posted September 10, 2015 Share Posted September 10, 2015 just un test #include <IE.au3> Local $Txt_to_send = 999 Local $oIE = _IECreate("http://blog.orbitremit.com/a-currency-exchange-rate-calculator-that-will-save-you-money/") _IELoadWait($oIE) Local $oDiv = _IEGetObjById($oIE, "calculator-btn") _IEAction($oDiv, "click") _IELoadWait($oIE) Sleep(1000) Local $oDiv = _IEGetObjById($oIE, "send-input") _IEAction($oDiv, "focus") _IEAction($oDiv, "selectall") Send($Txt_to_send) Link to comment Share on other sites More sharing options...
Noddle Posted September 10, 2015 Author Share Posted September 10, 2015 (edited) That's does work, but is there a way to do it all by code, so there is no ''clicking' as suchas in, query the site via code, and get the site to give 'up' the exchange rate it's offering ?or execute the java code somehow to get the returned values of the rate(s)after a lot more playing with this site, I found another link that gave me what I want,#include <IE.au3> Local $oIE = _IECreate("www.orbitremit.com/philippines?source=AUD",0,0) Local $sText = _IEBodyReadHTML ($oIE) $StartPos = StringInStr($sText,'<p class="data"><span class="flag flag-databox flag-ph"></span>') $tempString=Stringmid($sText,$StartPos + 63,13) ; ConsoleWrite($tempString & @CRLF) $EndPos = StringInStr($tempString,'</p>') -1 $DailyRate=StringLeft($tempString,$EndPos) ConsoleWrite("Rate is " & $DailyRate & @CRLF) _IEQuit($oIE)I'm sure there is much more elegant way to get the rate out of the return data, but this worksNigel Edited September 10, 2015 by Noddle Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now