I have code that I would like to use in more than one mls script.
Can I import code like this (functions & procedures) into the mls scripts where I need to use it
or do I need to cut and paste the same code into every mls script I write?
An example is this function that generates a somewhat random id.
function generate_ext_id(i: integer): string;
// generate a good enough random external playlist id
var s: string;
j: integer;
begin
s := '#E';
for j := 1 to 5 do
s := s + chr(65 + random(25));
s := s + '-' + inttostr(i);
result := s;
end;
Interesting information; never relalized the defines and ifdef/ifndefs worked in scripts. (The scripting engine is not my work but a 3rd party library.)