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

How can I automatize hyperlink creation?

New Here ,
Nov 21, 2016 Nov 21, 2016

Copy link to clipboard

Copied

Hi all. I have a tool catalog of 3,000 pages which originally was to be printed; however, the client now wants every product in this catalog to link back to each product's page on their website. Is there any way that I can automatize this process so I don't have to link every product manually? I realize there is the script function, but I have zero knowledge about scripting. There's gotta be an easier way?

Views

344

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
Guru ,
Nov 22, 2016 Nov 22, 2016

Copy link to clipboard

Copied

Hi there,

Of course it's possible. I made a number of scripts for the purpose. A few of them I posted on my site, for example:

Make hyperlinks from URL

Scripts for making hyperlinks

See also the 'Hyperlink' section here.

It's difficult for me to give you a specific advice because you didn't post some screenshots or samples, but I guess each product has a unique code number which can be used for GREP search and making a hyperlink. You may have a data base/excel/etc. file containing the info about the product numbers and their URLs which can be used by script.

Since you have zero knowledge about scripting, I recommend you to hire a scripter who can develop a script, or adjust an existing one for you.

— Kas

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 ,
Nov 28, 2016 Nov 28, 2016

Copy link to clipboard

Copied

hi Kas  I download from your website the  auto hyperlink script but only make 3 hyperlinks on the document and then do this

Captura de pantalla 2016-11-29 a la(s) 00.40.43.png

i errase the line 90 and works doing the hyperlinks on the text but not in the urls

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
Guru ,
Nov 29, 2016 Nov 29, 2016

Copy link to clipboard

Copied

I am not the author of the script: I took it from the forum, or maybe from this site. (This is its author).

The script was tested in CS3 but you're on CC. Something may have changed since then.

Maybe you have something in your layout that prevents the script from working properly.

— Kas

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
Guru ,
Nov 29, 2016 Nov 29, 2016

Copy link to clipboard

Copied

LATEST

I google-translated the error message from Spanish:

ya hay otro objeto con ese nombre means There is already another object with that name

I think this happens because you have several hyperlinks with the same name. Removing line 90 is a quick & dirty solution in this situation, but you'll get generic names.

Alternatively you may generate a random number and add it to the name. I used this approach (BTW it's also quick & dirty here). See the screenshot at the very bottom of the page.

You may modify the line 90 like so:

myHyperlinkDestination.name = myURL + "_" + String(Math.random()).replace(/^0\./, "");

which should give you a unique name for each destination.

Last note: I don't have your file so can't test it and tell you what exactly goes wrong; it's only guessing.

— Kas

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