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!
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).
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!