Get stat number, and use that number to run a process a certain number of times

Hi all,

I have a certain process that needs to be repeated depending on the number of pages there are.

At the bottom there is a statistic “Page 1 / Total 6” showing how many pages there are.
I want to be able to get the number and use the “total number” minus 1 to be the number of times a certain sequence needs to be run over again. (In this case it will be 6 - 1 = 5 times to run the sequence)

  1. How can I get rid of the text except for the final number?
  2. How can I use that number to repeat a sequence that certain number of times?

@dvn you can use ```
char e = string(string.Length-1); yo get the final number then convert it to int