Os: Windows 7 x64
I am new to java-script coding and i don't have much knowledge of java-script coding in iMacros for chrome browser. i will like iMacros to search for data in the csv file on the computer before auto performing functions on the web without my interventions. I will like to make examples with betting.
For example i create csv file on my computer and its look this way:
3.56 ----------- $35
3.17 ----------- $40
6.5 ------------ $48
3.67 ------------ $56
12.57 --------- $80
2.95 ---------- $95
Before iMacros place bet on any game it first of all browse through the csv file first before placing the bet. if iMacros browse the csv file and found odd matching the odds on the game it automatically check the game and place the stake amount specified in the csv file and if their is no match, iMacros skip to the last code to wait for seconds. see below code:
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=ID:Match_Result_0_Home CONTENT=YES
iMacros will only check the box above if the odds on this game match the odds on the csv file
TAG POS=1 TYPE=INPUT:NUMBER ATTR=ID:inputAmount CONTENT=$95
The stake is automatically inputted as specified in the csv file.
Please how can i go about this, the below is iMacros i found on iMacros site:
message = "This script demonstrates how to read data from the <address.csv> text file in the /datasource directory using"
message = message + " iMacros DATASOURCE features. In other words, the macro reads the data directly,"
message = message + " this script is only responsible for the loop over the data. This is similar to pressing the LOOP button,"
message = message + "but offers more flexibility e. g. when the number of records is unknown. The script uses the macro <wsh-file-2-web.iim>." + vbCrLf + VbCrLf
message = message + "Tip: This script has the same function as <file-2-web-method2.vbs> but uses a different method."
' find current folder
Dim myname, mypath
myname = WScript.ScriptFullName
mypath = Left(myname, InstrRev(myname, "\"))
Dim iim1, i, iret
set iim1= CreateObject ("imacros")
iret = iim1.iimOpen("")
if iret < 0 then MsgBox "Error during Initialization. Error code: "+cstr (iret)
iret = iim1.iimDisplay("Submitting Data")
if iret < 0 then MsgBox "Error iimDisplay. Error code: "+cstr (iret)
'Note: The input file name is specified in the macro
'You can also specify it inside the script with "iimSet"
'Loop through the input file until end
'We start at "2" to skip the first header line in the file
i = 2
while iret <> -1240 ' at end of input file, iMacros stops with error -1240
'Set the current read position
iret = iim1.iimSet("line", cstr(i))
'Run the macro
iret = iim1.iimPlay(mypath & "Macros\wsh-file-2-web.iim")
'Check if user wants to stop
if (iret = - 102) Or (iret = -101) Then
MsgBox "Stopped by user"
i = i + 1
iret = iim1.iimDisplay("Done!")
iret = iim1.iimClose