Group: Forum Members
Posts: 8,
Visits: 71
|
Hi everyone, I would like to dynamically change the textcolor via expressions as I do for the text that is presented - but this does not work. Does anybody know whether there is a bug in my script or if there is any other way to dynamically change the textcolor of an element depending on conditions? Thank you for your help!
<text newTaskReminder> / items = ("<%expressions.new_task_reminder%>") / position = (50%, 80%) / txcolor = <%expressions.newTaskReminderColor%> / size = (80%, 6%) / fontstyle = ("Arial", 3%, false, false, false, false, 5, 1) </text>
<expressions> /new_task_reminder={ if(values.targetTask == values.taskA) { "BUCHSTABE ~n '<%text.letter.#ff2e50%>' ~n'<%parameters.leftKeyLabel%>': <%expressions.letter_left%> '<%parameters.rightKeyLabel%>': <%expressions.letter_right%>"; } else if (values.targetTask == values.taskB) { "ZAHL ~n '<%text.number.#ff2e50%>' ~n'<%parameters.leftKeyLabel%>': <%expressions.number_left%> '<%parameters.rightKeyLabel%>': <%expressions.number_right%>"; } else { "?????????"; } }
/newTaskReminderColor={ if(values.targetTask == values.taskA) { darkmagenta; } else if (values.targetTask == values.taskB) { limegreen; } else { orangered; } }
</expressions>
|