Looping syntax in firefox

I am having trouble figuring out how to add a loop to an existing macro. In my current macro which works well, these three lines repeat a bunch of times:

  1. StoreText xpath=//*[@id=“root”]/div/div[4]
  2. Pause 500
  3. Click linkText=›

And the macro’s last command is: “csvSave”

I would like to put the first three lines in a loop of 40 iterations. It appears that the “Times” command should do it, but I don’t know how I would get the “Times” command to refer to the first three lines only.

If there is a different looping command than “Times” I would be happy to use it, but my research hasn’t turned up any code examples to follow.

Thank you very much in advance for any help one can offer.

For this, use the END command. Only the lines between TIMES and END are repeated.

  • times | 40
  • your 3commands here
  • end
  • next commands here…