11.12.2017, 10:28
(10.12.2017, 10:04)baggins Wrote:Hi(13.04.2016, 11:27)edgars Wrote: In the firmware starting from 4.2016 there is Custom JavaScript feature available in LogicMachine --> Scripting --> Tools --> Edit custom JavaScript.Hi,
It is possible to create different dynamic tasks, like detect short/long press from visualization using one icon (Erwin, will you please add your example here) or as in this example, we can open specific Floor/Plan when some grp address is triggered - useful e.g. when you want IP Camera page automatically to be opened when Intercom button is pressed:
Code:$(function(){
if (typeof objectStore !== 'undefined') {
var id = Scada.encodeGroupAddress('1/1/2');
objectStore.addListener(id, function(object, type) {
if (type == 'value') {
showPlan(69);
}
});
}
});
showPlan() value can be get when you hover your mouse over specific plan name and click on the arrow. Please see in pictures attached.
I have two addresses, say '1/1/2' and '1/1/3' that I want to use to trigger the same showPlan. I have absolutely no knowledge of javascript, so how do I modify this code?
Is my understanding correct that this code gets executed whenever any address is triggered?
Thanks.
Just use the function twice.
BR
------------------------------
Ctrl+F5
Ctrl+F5