Csv resets after each loop, how to fix?

Im trying to run a script that loops and uses the times command to run a certain part of the script 5 times then the other part 1 time. I also need the csv to read the next line after very times command so i am using: “Command”: “executeScript_Sandbox”,
“Target”: “return Number (${!csvReadLineNumber} ) + 1”,
“Value”: “!csvReadLineNumber”

This works just fine and goes to the next line, that is until the loop goes to loop 2. Then it starts back over with the start of the csv file, how do i make it not start over and just keep going down the csv file even when the loop starts over?

Can you please post a test macro? It is a bit difficult to understand the issue just from the text.

{
“Name”: “test”,
“CreationDate”: “2020-4-30”,
“Commands”: [
{
“Command”: “times”,
“Target”: “1”,
“Value”: “”
},
{
“Command”: “XType”,
“Target”: “{KEY_ALT+KEY_CTRL+KEY_F}", "Value": "" }, { "Command": "XType", "Target": "start C:\\Users\\chronic\\Desktop\\3.25\\ProxyTool\\AutoProxyTool.exe -changeproxy/US", "Value": "" }, { "Command": "XClick", "Target": "3bz9bf_dpi_96.png", "Value": "" }, { "Command": "XClick", "Target": "jvqjms_dpi_96.png", "Value": "" }, { "Command": "XClick", "Target": "p3qdn2_dpi_96.png", "Value": "" }, { "Command": "XType", "Target": "{KEY_SHIFT+KEY_CTRL+KEY_N}”,
“Value”: “”
},
{
“Command”: “XClick”,
“Target”: “atka0z_dpi_96.png”,
“Value”: “”
},
{
“Command”: “times”,
“Target”: “5”,
“Value”: “”
},
{
“Command”: “open”,
“Target”: “https://signup.firstrade.com”,
“Value”: “”
},
{
“Command”: “csvRead”,
“Target”: “readcsvtestdata.csv”,
“Value”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “return Number ({!csvReadLineNumber} ) + 1", "Value": "!csvReadLineNumber" }, { "Command": "type", "Target": "name=FirstName", "Value": "{!COL1}”
},
{
“Command”: “pause”,
“Target”: “500”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “name=LastName”,
“Value”: “${!COL2}”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”
}
]
}

I do not suggest to use image recognition in macro and create a more easy and fast code.

This is a long code for a simply macro can be rewrited in better way without using image recognition that require focus on screen.

You can set proxy with internal command without using external software.

it cant be done without image recognition because i have to close out of chrome and relaunch chrome which require desktop view not browser view. Also i dont have specific proxies rather a tool that i have a certain amount of proxies i buy and every time it types that command into cmd it buys a new fresh proxy. Its working great i just need to know how to get it to not go back to the start of the csv after every loop

I regulary close firefox without using image recognition simple I use Xtype KEY_ CTRL+KEY_W

And i reopen browser unlimited (in multi browser too) with batch file that wait the closure of browser, when the browser will be closed, batch file restart browser and wait again to reopen it (you can do this in python too).

All your command can be maked in better, fast and easy macro code.

Try to remove the space in your code

“Command”: “executeScript_Sandbox”,
“Target”: “return Number (${!csvReadLineNumber} ) + 1”,
“Value”: “!csvReadLineNumber”

Try to remove space
From
(${!csvReadLineNumber} )

To
(${!csvReadLineNumber})