Hello everyone,
So I have been trying to do this for a while now and I can't get my head around it.
I'm making a script to export multiple picture from a few different folders. I have created an "import" function and a "trim" function.
Import = Function ({path},
dtimport= Multiple File Import (
// the import arguments
)<< Import Data;
Return (dtimport);
};
Trimtables = Function ({table, arg1, arg2, arg3},
table:Image<<Set Name ("Image" || Char(arg1)) ;
// anda Bunch of other instruction
};
path = Pick Directory();
dt1=Import (path);
So it works fine until I try to send this table as argument for my trim function.
I understand that dt1 is not my actual table but just a pointer and that If i send that directly to the table the function would only have a pointer to that pointer. So I tried using :
dt1<<Set Name ("My data table");
Trimtables (Data Table ("my data table"), arg1, arg2 ,arg3);
and That works fine. The issue is when I try not to use a custom title for each table. I tried the following :
Trimtables (dt1<<Get Name(), arg2, arg3, arg4);
But this does not work. I tried a whole lot of variations (while changing what the function expects):
Trimtable (Char(dt1<<Get Name ()), arg1, arg2, arg3);
or
Trimtable (Eval(dt1), arg1, arg2, arg3);
or
Trimtable (Print(Char(dt1<<Get Name ()), arg1, arg2, arg3);
But nothing seems to work . Essentially what I would need would be like in C where you would send &datatable as argument. I'm sure this is pretty trivial but for the lfie of me I can't get my head around it.
Any ideas ?
Thanks,
Bob
~~Bob~~