Hi folks!
Maybe someone could help me out.
I want to store strings in several Monitor objects, because its one of the few possibil. to store data(which is represent at re-start).
i put the strings in an array:
-> array = getattribute(findobject(wordfind),'content')
and then i have to store this collected object to a Monitor
-> savecatlib1.value = array
the problem is, that i couldn't find a proper way to dynamically store the values in the according monitor
(depending on where another switch is pressed) -> savecatlibX.value = array
X should be dynamically adressed.
i also tried some kind like this:
mon = {savecatlib1.value,savecatlib2.value,...}
mon = array;
Any suggestion / help..?
thanks!
schoko
Addressing Monitor.value
Re: Addressing Monitor.value
I think storing values in an array is much cleaner and easier option (and they are saved until next restart as long as you don't assign them an initial value). And keep in mind they only hold up to 256 elements per array.
You can use a loop or individual assignments to store/recall data:
//STORING
storeArray[index] = value;
storeArray = {val1, val2, val3};
//some loop {
storeArray = value;
}
//RECALL
value = storeArray[index];
Hope that helps
You can use a loop or individual assignments to store/recall data:
//STORING
storeArray[index] = value;
storeArray = {val1, val2, val3};
//some loop {
storeArray = value;
}
//RECALL
value = storeArray[index];
Hope that helps
Re: Addressing Monitor.value
yepp, thanks for your reply, i tried that before...
the problem is, that i have a lot of lists, >100, so i need to deal with changing names of arrays....
anyway i found a possible solution..., in case some needs that...
i have an object with switches, "under" this object i create expressions (arrays) with a defined naming schem..
the switches are called "selection"
the array has a naming like "L_LIB[x]_[y]
relevant code:
-------------
decl nameone = 'selection.L_LIB' + i + '_' + j;
decl tempparray = getexpression(selection,nameone);
//loop begin
temparray = getattribute(findobject(words),'content')) // text objects i input with a keyboard (ipadasciikeyboard template modified)
setexpression(selection,nameone,temparray); //write to L_LIB....
//loop end
-----------
with this you can address different arrays (with different names) with quite easy string conc.
needs to be fully test..., seems to work here..
the problem is, that i have a lot of lists, >100, so i need to deal with changing names of arrays....
anyway i found a possible solution..., in case some needs that...
i have an object with switches, "under" this object i create expressions (arrays) with a defined naming schem..
the switches are called "selection"
the array has a naming like "L_LIB[x]_[y]
relevant code:
-------------
decl nameone = 'selection.L_LIB' + i + '_' + j;
decl tempparray = getexpression(selection,nameone);
//loop begin
temparray = getattribute(findobject(words),'content')) // text objects i input with a keyboard (ipadasciikeyboard template modified)
setexpression(selection,nameone,temparray); //write to L_LIB....
//loop end
-----------
with this you can address different arrays (with different names) with quite easy string conc.
needs to be fully test..., seems to work here..
Re: Addressing Monitor.value
You are on the right track, you definitely need to tie multiple arrays like that for large storage in lemur.
That's why the [findchild()] and [getexpression()] methods are useful in this situation
That's why the [findchild()] and [getexpression()] methods are useful in this situation