Newbie--AppleScript for InDesign CS5 help needed
How can I select a page number in a table (a text string as a Source) and have an AppleScript read that text string and convert it to an integer value?
I have to put over 1,200 hyperlinks into a document that already has page numbers in tables. Each page number (Source) will be assigned a hyperlink to go to that page (Destination).
The page numbers in tables are in the preface to my document, which is 44 pages in length.
The actual pages in the main body of my document are numbered 1-432. Thus, the 45th page in the document is Page 1 to the person reading it, and the 476th page is Page 432.
So if a table in my preface has a page number of 32, for instance, the actual page number I want as a Destination is 32 + 44, or page 76.
If I manually double-click to select the text of a number "x" in a table as a Source, I want to write a script that when invoked will
• read the text string I have selected
• convert it to an integer value equal to the number in the text string
• add 44 to that value
• create a hyperlink that goes to the destination page number that corresponds to that value
Thanks.
