The renewal maintenance has officially ended for Progress iMacros effective November 30, 2023.
This Wiki site will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely, The Progress Team
Get-Exchange-Rate.vbs
Jump to navigation
Jump to search
This script calls demo macro Wsh-Extract-Rate in tray mode. It extract exchange rate information and displays it to the user.
'Note: EXTRACT requires Internet Explorer 6.0 or better to be installed Msgbox ("This example will retrieve the current exchange rate for US$, EURO and GBP. This macro will run in the system tray.") dim ExchangeRate set iim1= CreateObject ("InternetMacros.iim") iret = iim1.iimInit ("-tray") iret = iim1.iimDisplay("Extract Example") iret = iim1.iimSet("-tray", "") iplay = iim1.iimPlay("wsh-extract-rate") data = iim1.iimGetLastExtract() errortext = iim1.iimGetLastError() iret = iim1.iimExit If iplay = 1 Then if instr (data, "[EXTRACT]")> 0 then ExchangeRate= Split(data, "[EXTRACT]") s = "One US$ costs " + ExchangeRate(0) + " EURO or " + ExchangeRate(1) + " British Pounds (GBP)" MsgBox s else MsgBox "Done, but no data extracted. This case should not happen unless there is no EXTRACT command in the macro." end if End If If iplay < 0 Then s = "The following error occurred: " + vbCrLf + vbCrLf + errortext MsgBox s End If WScript.Quit(0)
Macro code for Wsh-Extract-Rate:
VERSION BUILD=300625 TAB T=1 TAB CLOSEALLOTHERS URL GOTO=http://www.iopus.com/imacros/demo/v5/extract.htm 'Get the values EXTRACT POS=28 TYPE=TXT ATTR=<TD<SP>class=bdytxt>* EXTRACT POS=29 TYPE=TXT ATTR=<TD<SP>class=bdytxt>*