• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

looking for a script to change numbers to hyperlinked pagenumbers

New Here ,
Feb 10, 2021 Feb 10, 2021

Copy link to clipboard

Copied

dear community,

 

i'm looking for a script in indesign. in my case, i have a table of contents which isn't made from indesigns table function. so i got like 400 numbers in a column, which have to be hyperlinked to each page.

i'm looking for a script, which takes all of this numbers and converts each of them to a hyperlink, which goes to the page. the numbers are already the pagenumbers. 

i didn't find anything that could help… maybe some kind human-being could help with that?

 

best regards,

sarah

TOPICS
How to , Scripting

Views

292

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 10, 2021 Feb 10, 2021

Copy link to clipboard

Copied

Maybe "Livetoc" script may help you
You can try a demo version free

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

I don't see this function there + we can't pay money, but thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 10, 2021 Feb 10, 2021

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

just a bump 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

Hi Sarah, 

Not a trivial solution that can be solved with free help on a forum. First you need to identify which numbers to grab, handle if a page number is used at different places in the document (which it can due to sections), etc. Did you download the Live TOC demo and try? There is a hyperlink function. $49 USD seems like a steal for the amount of time that would be saved having to do this manually. That'd probably be the bottom of what a developer would charge to develop this customly. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

That's true! I tried the demo but it sadly doesn't work for my need or I don't understand how! But I don't need something that's making a full Index because the Index already exists in a certain structure… I just need to hyperlink the numers. But in the end, I see myself doing it manually 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

Lot of people are willing to give free script (Including Me). But for that mention your concern in datails providing screenshots & description.

 

Sunil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

Dear Sunil,

I got an Index, delivered by the client. The publiacation is round about 400 pages strong. The Index is not sorted Alphabetically, like the pages in the publication is. So the table of contents from inDesign doesnt help. I'll show u a screenshot of the Index. I'm looking for a script to automate the numbers to be a hyperlinked page number.

I already got a script like this but it doesn't work:

myDoc = app.documents[0];
function tagHyperlinks(object){
app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat = ".+";
app.findGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyles.item("toclink");
for(i = 0; i < object.length; i++){

theText = object[i].findGrep();

for(ta = 0; ta < theText.length; ta++){
try{
page = GetPage(theText[ta].contents).page;
myHyperlinkURL = myDoc.hyperlinkPageDestinations.add(page);
myHyperlinkSource = myDoc.hyperlinkTextSources.add(theText[ta]);
myHyperlink = myDoc.hyperlinks.add(myHyperlinkSource, myHyperlinkURL);
myHyperlink.visible = false;
myHyperlink.name = 'zu Seite ' + theText[ta].contents;
}
catch(myError){}
}
}
}

function GetPage(pageNum) {
var obj = null;
for (var i = 0; i < app.documents.length; i++) {
if (app.documents[i].pages.itemByName(pageNum).isValid) {
obj = {page: app.documents[i].pages.itemByName(pageNum), docDest: app.documents[i]};
break;
}
}
return obj;
}

tagHyperlinks(app.documents[0].textFrames);

 

Bildschirmfoto 2021-02-12 um 13.14.36.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

Can you be able to share InDesign document. So that I can test it & I can be able to write it...

I don't think it will take much effort.

 

Sunil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

Dear Sunil,

I'm sorry I can't do that because of restrictions 😞 So if it's not possible for you to do it without it, it's okay. Thanks so much for caring!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

Is that built with a table. If so what column are the page numbers in? 2 or 3? Is the table a series of linked text frames? Is this a book or single INDD? Are page numbers repeated in the document due to sectioning? Can you create a sample INDD file that mimics the index without disclosing IP?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

LATEST

I understand the confidentiality of your work. Instead of sharing file with original content, you can put dummy contents in it & then share it.

 

Sunil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines