Search found 2 matches

by RufusWhite
09 Aug 2014 18:06
Forum: Troubleshooting
Topic: Evaluate a string to run a function?
Replies: 0
Views: 1048

Evaluate a string to run a function?

Hi,

is there a way of running a script from a string - so for example at right now, I'm just using if():

Code: Select all

if (x) { pgm1(); }
else if (y) { pgm2(); }
else if (z) { pgm3(); }
whereas I'd prefer to do:

Code: Select all

evaluate('pgm' + currentPgm + '();');
is there a way of doing this?

Many thanks!
Rufus
by RufusWhite
17 Sep 2012 19:16
Forum: General Discussion
Topic: Referencing objects with strings
Replies: 1
Views: 772

Referencing objects with strings

Is there a way when scripting in Lemur to reference an object with a string? For example if I have a grid of buttons: container.button1 container.button2 container.button3 how can I reference them programmatically based on an input from another control/midi cc, eg: container.button(MIDI_ARGS[0 ...