I use a 10 key pad to dial in bib numbers for competitors. For the time being we use %relid% in various groups to call up lower thirds, name bugs, and results tied to a local xlsx database. For example, the lower third biography is group 1000. On a setup tab I have parameters that are manually filled in for the various groups. So, for biographies, the operator will enter 1000 for this example. On the "take" button I have a math block that adds the group parameter to the bib number and puts that scene on air. I don't even remember where I got the scripting for the 10 key buttons, but it uses strings and I can set a limit to the total number of characters displayed (in my case 3 places because our bibs go up to 150). But to add 1000 to the 10 key parameter I have to use integers. Ok here is the question: I looked for concatenate in the string section of OG blocks thinking I could just add "1000" to the string. Can I do it with a string or should I continue to use integers?
Here is the script for the "7" on the 10 key. If I use a string this will limit the length to 3 places and works great. Is there a way to duplicate this scripting but using integer, or is there a way to covert string to integer-add the group parameter (1000)-convert back to string? It works fine with integer but I can't limit the input to 3 places.
var value=params.getValue('DATA_Lead_Bib',0);
if (value.length >= 3)
value = value.substring(1,2);
value += '7';
params.setValue('DATA_Lead_Bib',0,value);
As always, thanks in advance
------------------------------
Malcolm Thorpe
Free Lance Xpression Designer/Carbonite TD
------------------------------