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
Difference between revisions of "File-2-Web.vbs"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | Option Explicit | + | Option Explicit |
MsgBox "This script demonstrates how to read data from the <address.csv> text file in the /datasource directory using the | MsgBox "This script demonstrates how to read data from the <address.csv> text file in the /datasource directory using the |
Revision as of 21:47, 10 May 2007
Option Explicit MsgBox "This script demonstrates how to read data from the <address.csv> text file in the /datasource directory using the Internet Macros DATASOURCE features. In other words, the macro reads the data directly, this script is only responsible for the loop over the data. This similar to pressing the LOOP button, but offers more flexibility e. g. for advanced error checking. The script uses the macro <wsh-file-2-web.iim>." + vbCrLf + VbCrLf + "Tip: This script has the same function as <file-2-web-method2.vbs> but uses a different method." Dim iim1, i, iret set iim1= CreateObject ("InternetMacros.iim") iret = iim1.iimInit iret = iim1.iimDisplay("Submitting Data") 'Note: The input file name and the number of columns are specified in the macro 'You can also specify them inside the script with "iimSet" 'Loop through the input file 'We start at "2" to skip the first header line in the file for i = 2 to 4 'Set the current read position iret = iim1.iimSet("-var_line", cstr(i)) 'Run the macro iret = iim1.iimPlay("wsh-file-2-web") 'Check if user wants to stop if iret = - 3 or iret = - 5 Then MsgBox "User closed browser" WScript.Quit(0) End If If iret < 0 Then MsgBox iim1.iimGetLastError() End If next iret = iim1.iimDisplay("Done!") iret = iim1.iimExit WScript.Quit(0)