Getting a Number Range from 1 to X
Posted: Tue Apr 21, 2020 10:47 pm
Hello
After my script gets the page number of the last page of a PDF, I need a script that (1) generates the range of numbers from 1 to the total number of pages and then (2) sets the text of an menu button to those numbers as a list, e.g., if the total pages of an PDF is 3, the script sets the text of an pulldown menu as follows:
The purpose is to enable the user to go to a particular page of a PDF. If I have the range of numbers, I know how to set the text, but am frustrated in finding the script that gets the numbers. I am thinking a repeat loop and an array are used but am asking for confirmation and perhaps a tip if not the actual script. Thanks for your replies.
Monty
After my script gets the page number of the last page of a PDF, I need a script that (1) generates the range of numbers from 1 to the total number of pages and then (2) sets the text of an menu button to those numbers as a list, e.g., if the total pages of an PDF is 3, the script sets the text of an pulldown menu as follows:
The purpose is to enable the user to go to a particular page of a PDF. If I have the range of numbers, I know how to set the text, but am frustrated in finding the script that gets the numbers. I am thinking a repeat loop and an array are used but am asking for confirmation and perhaps a tip if not the actual script. Thanks for your replies.
Monty