If looping a macro that contains:
{
"Command": "selectWindow",
"Target": "tab=1",
"Value": ""
},
Forums suggest that this goes to next tab. The first loop works correctly. Subsequent loops fail inconsistently - anywhere from the second to the nth iteration. That it’s inconsistent may be a bug. That it’s going to the next tab to the right more than once implies that at least some of the time the reference zero tab is being reset on loop.
Calling commands as follows also succeeds at Next Tab the first time, but always fails on the second iteration:
{
"Command": "run",
"Target": "A Series of Commands",
"Value": ""
},
{
"Command": "selectWindow",
"Target": "tab=1", //THIS SUCCEEDS
"Value": ""
}, {
"Command": "run",
"Target": "A Series of Commands",
"Value": ""
},
{
"Command": "selectWindow",
"Target": "tab=1", //THIS FAILS
"Value": ""
},
Testing indicates that this is not a next tab scenario, but that the tab focused at the start of the process is tab zero, no matter what tab it is counting from the right. Going to a named tab avoids Error 101 if an external command has run (I think), but the tab focused initially is still tab 0. So first instance of next tab: tab=1, next tab=2, etc. Why just tab=1 on repeat sometimes works in a macro that’s looping, and sometimes not, I have no idea, but for calling a macro from another macro, it looks like we’re stuck with tab=1, tab=2, etc. relative to first position:
{
“Command”: “run”,
“Target”: “A Series of Commands”,
“Value”: “”
},
{
“Command”: “selectWindow”,
“Target”: “tab=1”, //THIS SUCCEEDS
“Value”: “”
},{
“Command”: “run”,
“Target”: “A Series of Commands”,
“Value”: “”
},
{
“Command”: “selectWindow”,
“Target”: “tab=2”, //NOW INTO THE SUBSEQUENT TAB, SUCCESS
“Value”: “”
},
Assuming I’m not committing horrible atrocities somehow, it looks like tab selection needs to be done outside of a loop if one wishes to change tabs once per loop.