sir, i think there is an issue/bug in store command. if i store value less or equal 99 its save in variable as number but i enter value greater than 99 its save as string. by this issue while loop not working in macro.
i need to convert variable value in number with excutescipt command .and then while worked perfectly.
my code code:
{
"Name": "test",
"CreationDate": "2023-9-23",
"Commands": [
{
"Command": "store",
"Target": "3",
"Value": "START_LOOP",
"Description": ""
},
{
"Command": "store",
"Target": "100",
"Value": "END_LOOP",
"Description": ""
},
{
"Command": "store",
"Target": "${start_loop}",
"Value": "a",
"Description": ""
},
{
"Command": "comment",
"Target": "executeScript // return Number(${end_loop});",
"Value": "end_loop",
"Description": "convert into number/covert string to value"
},
{
"Command": "executeScript",
"Target": "return ${a} <= ${end_loop};",
"Value": "result",
"Description": "test condition"
},
{
"Command": "echo",
"Target": "condition : ${result}",
"Value": "green",
"Description": ""
},
{
"Command": "comment",
"Target": "pause // ",
"Value": "",
"Description": ""
},
{
"Command": "while_v2",
"Target": "${a} <= ${end_loop}",
"Value": "",
"Description": ""
},
{
"Command": "echo",
"Target": "Current Loop: ${a}",
"Value": "red",
"Description": ""
},
{
"Command": "executeScript",
"Target": "return Number(${a})+1;",
"Value": "a",
"Description": ""
},
{
"Command": "end",
"Target": "",
"Value": "",
"Description": ""
},
{
"Command": "",
"Target": "",
"Value": "",
"Description": ""
}
]
}
and here results
if value less <= 99
and if value >99
please check is it any issue/error in my code or it’s a bug (of store command or while loop command).
maybe it’s while loop command issue. while loop not converting variable value in number before execution/apply the condition.