Buy Now Download Search:
Home Products Purchase Service & Support Partner Programs Contact Us
 iMacros
  Product Information
Success Stories NEW
Compare Editions
Web Image Recognition
Press Reviews NEW
System Requirements
Online User Manual
Product Flyer (PDF)
  Support
Online Demos
Code Samples
Tutorials
iMacros User Forum
  FAQ
  Buy iMacros
  Customer Login
  Support Ticket
   
 
   
   
Home > iMacros >
VBS Sample Code

Click here to download this VBS file (This file is part of the iMacros Trial version)

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)

 


 
 
 
©2000-2008 iOpus Inc., Pat. Pending
| Search | Purchase | Community |
 

The availability and performance of this website is monitored by iMacros Web Testing