@spa3212 said in UI button to perform specific function:
I wonder if it is possible to have a Button on a UI interface. When click it perform a specific Call to function.
@ivdkop Выполнить код
function check(data,threshold,step){
var flag = false;
if(data.length-1<step){
return flag;
}
var counter = 0;
for(var i=0; i<threshold; i++){
if(data[i] >= threshold){
counter++;
}
}
if(counter==step){
flag = true;
}
return flag;
}
var data = [5 , 5, 7, 7, 10, 9, 6, 8, 0, 1]
[[FLAG]] = check(data,5,5)

If you want to search for the first 5 numbers, just separate the first 5 numbers, then do the comparison, then draw a conclusion.
@Melinda I told you here.
You won't understand @ivdkop way of doing things
Simplified and easy to understand, just use specific actions in BAS.
TEST 1.xml