samedi 15 juillet 2017

How to set var value from a datasource file?

hi everyone :) english isn't my first language so please excuse any mistakes, i want to run imacros with the var value from a datasource file instead of a hardcoded value, I don't have a great knowledge in programming, but i tried some of the methods but it always ends up with fails

Here is the code that i'm trying:

    var load;
    load = 'CODE: ';
    load += 'SET !DATASOURCE eacc.csv' + '\n';
    load += 'SET !DATASOURCE_COLUMNS 3' + '\n';
    iimSet('i', I);
    load += 'SET !DATASOURCE_LINE ' + '\n';
    load += 'ADD !EXTRACT ' + '\n';
    load += 'ADD !EXTRACT ' + '\n';
    load += 'ADD !EXTRACT ' + '\n';
    iimPlay(load)
    var COLUMN1 = iimGetLastExtract(1);
    var COLUMN2 = iimGetLastExtract(2);
    var COLUMN3 = iimGetLastExtract(3);

var a1 = 
        for(var J = 1; J <= a1; J++)
        {
           xxxxxxxxxx
        }

i'm trying to put the column3 value to the LOOP

Here is my datasource:

XXX,YYY,10
XXX,YYY,20
XXX,YYY,05
XXX,YYY,13

so anyone know how to solve this and thanks in advance :)

Aucun commentaire:

Enregistrer un commentaire