Thanks @kendash
I really appreciate this.
Have you tried putting that tag in the template directly? In other words: don’t use the CALL:X and don’t use a script. If you still see no results for the minutes, did you rename any of your State Groups?
Do any of your Scripts work properly when used with CALL:x ?
Check the block setting. 276 might be too many pixels for your screen. I use 30" screen. Is the numbers running off screen?
So did you get it working? BTW me and @QMcKay had that same issue early on in testing when he first introduced Script Debugger
Yes i did. probably was my problem too.
Thanks.
I really like this new lister format. And I love that it changes color. I think there are a lot of people that will like this.
Dear @kendash
Can you show an example of how to change colors more than once. 10 min= green 20 min=orange 30 min=red etc…?
Can we change the ticket background color after certain time?
Thanks.
Would have to edit the script and add in more If statements.
No unfortunately not at this time.
Will need more returns to go with the if statements. They should be inside each statement.
Try something like this
function min(minutes)
{
var test = minutes;
if (test>15){
return '<R><block 276,0,0,0><color Red>' + test + ' min.</color></block>';
}
else if (test>10){
return '<R><block 276,0,0,0><color Green>' + test + ' min.</color></block>';
}
return '<L><block 276,0,0,0>' + test + ' min.</block>';
}
If you want more than 1 range of minutes then you start with the biggest and use else if for each one going from big to small.
So far your example you would do something like this:
function min(minutes)
{
var test = minutes;
if (test>30){
return '<R><block 276,0,0,0><color Red>' + test + ' min.</color></block>';
}
else if (test>20){
return '<R><block 276,0,0,0><color Orange>' + test + ' min.</color></block>';
}
else if (test>10){
return '<R><block 276,0,0,0><color Green>' + test + ' min.</color></block>';
}
return '<L><block 276,0,0,0>' + test + ' min.</block>';
}
fyi <block>
tag also supports background color if it helps.
<block margin color>
setting a margin is required to set a color.
Hmm I must have read over that. I will toy with that now.
Lol interesting I will have to play with this to get it right.
That was White as a test … I see it applied it only to the area that script was called at. So to get a result for total ticket we may need to build entire ticket template inside a call.