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

Automating hyperlink creation

Community Beginner ,
Oct 11, 2011 Oct 11, 2011

Copy link to clipboard

Copied

Hi all,

I'm a Frame AND scripting noob. I'm migrating several long docs from Word to Frame 10. I'd like to figure out how to automagically ID and add hyperlinks to URLs written in plain text after conversion. This sounds like a job for ExtendScript.

My mental model looks like this:

1. Wildcard search for "www.*" or similar;

2. Copy url text;

3. Open HYPERTEXT toolbar in Frame UI;

4. Set 'Command:' to 'Go to URL';

5. Paste 'http://' and copied URL text into box;

Pretty simple non paper, but is this feasible using JScript or EScript? Thanks in advance!

TOPICS
Scripting

Views

897

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 ,
Oct 11, 2011 Oct 11, 2011

Copy link to clipboard

Copied

Hi,

Yes, you can do this with ExtendScript. One thing to keep in mind though; if your output is PDF, Acrobat can automatically convert URLs to links in the resulting PDF file. But, you can certainly do it in FrameMaker with ExtendScript (or FrameScript, if you have it).

Rick

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 ,
Oct 11, 2011 Oct 11, 2011

Copy link to clipboard

Copied

LATEST

Mugg,

You have to change your mental model from being too close to the UI. It would work like this:

1. Wildcard search for "www.*" or similar; or: use the current selection

2. Copy url text; no need to use the clipboard, just store it in a variable

3. insert a marker of type "Hypertext" at the start of the text range

4. set marker text to "message URL http://" + stored website.

5. apply a  character format to the text range from marker until end of found/selected text.

The last step limits the "hot" area to that range.

Now, go ahead!

- Michael

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