iimSet
Top  Previous  Next


Assigns values to variables. There are limitations as to what variables you can set using this command. You can set all built-in variables which you also can set via the command line. Additionally, you can set all user defined variables. After iimPlay all variables are erased. The return code is always 0.

Syntax


int ret_code = iimSet ( String var_string, String var_value )


Parameters

String var_string
A string defining which variable is to be set. Use
-var_varName for any user defined variable named varName. Use the following var_string for the built-in variables:
   -timeout   !TIMEOUT
   -loop      !LOOP
   -datasource   !DATASOURCE
   -var1      !VAR1
   -var2      !VAR2
   -var3      !VAR3


String var_value
The value which is to be assigned to the variable.


Examples

Loop over a number, for example to extract one table element after the other

Dim imacros, iret, i
Set imacros = CreateObject("InternetMacros.iim")
iret = imacros.iimInit()
For i=0 To 4 
  ' You have to convert the value into a string!
  iret = imacro.iimSet("-var_loop", CStr(i))
  iret = imacros.iimPlay("mymacro")
Next


See Also




Page URL http://www.iopus.com/imacros/help/scripting_iimset.htm