I've been doing some tests on this myself, and have come up with the following JavaScript.
It doesn't work, however.
I'm sure it's to do with the way I initialise the
'presets' Array. I haven't used Arrays a lot in
JavaScript, so I'm a bit confused. If someone could
point me in the right direction, I'd be really
grateful.
I need to be able to store 5 different values for the
'Parameters' struct/array in 'presets'.
Presets are stores when 'Store'=true, into the memory
location defined by 'StoreIndex', and the output is
set by 'RecallIndex'.
I've attached the QTZ also.
Cheers again,
alx
/*
Stores Parameters in 1 of x number of 'memory
loactions'.
Parameters input should be a structure in the form
{
"Parameter 1" : value1,
"Parameter 2" : value2
}
*/
function (__structure OutputStruct) main (__structure
Parameters, __boolean Store, __number StoreIndex,
__number RecallIndex)
{
// Initialise output object
var result = new Object();
// Number of memory locations
var memories = 5;
// Initialise presets array
var presets = new Array();
if(Store = true && StoreIndex > 0) {
presets[StoreIndex] = Parameters;
};
result.OutputStruct = presets[RecallIndex];
return result;
}
___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/
PresetStorage Test 181207.qtz
Description: 2560712422-PresetStorage Test 181207.qtz
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]

