I work for a newspaper and am trying to create a very rudimentary system to integrate print with the web. Very, very rudimentary.

My idea is this:

All the articles on our website have an ID number, with a corresponding URL, so an article might be something like "http://www.ournewspaper.com/articles/83920". From there, there's an edit button you can click on (if you're logged in to edit the website), which will take you to the back end, where you enter all the metadata for the story (headline, author, image captions, related links, tags, etc.).

I was thinking of having each InCopy story linked to its corresponding article on the web, so that people could click on the story in the InDesign layout (either from InCopy or InDesign) and run a script which would give them the ID number of the story in our website's CMS. This ID number would be stored as a label of the Story object. Once the person who is editing the story has access to the web page for that same story, they can start typing in all that metadata, and after the paper has gone to print, they can upload the story itself (processed by another script I wrote).

If worst comes to worst, I could just have the script provide the user with the URL for the story, and they can cut and paste it into a browser window. But I have a feeling this will not make our editors happy.

So my question is: does anybody know a way we can have the script open a browser, and point it to the appropriate URL?

Also, if anyone knows of any cheap and simple solutions that have already been created along these lines, I'd be happy to hear them.

This one, too, (due to Dave Saunders) is platform neutral. I doubt it will work if ID is locked in a modal state, but I whether that's an advantage I don't know. (...)

Typically, Gerald's approach (modal state safe) allows to launch the browser from a ScriptUI dialog, while Dave's approach needs to invoke the InDesign DOM (create a ghost document, etc.) which fails within a modal dialog.

1. What's kAppVersion, in line 3? My interpreter doesn't recognize that word. I changed that line to

if (+app.version[0] > 6) { // take first letter of version string, convert it to a number

and it works.

2. In the case of versions below 7, on the Mac, when you say

linkJumper.execute();

it opens the file in my text editor, which is what .html files are set to open with on my computer. Is there a way to force it to open in a web browser without using doScript, which will not open in a modal state?

This is an academic matter for me, as the typical user always has .html files set to open in browsers, and also everyone at my place of work is running CS5. But I'd be curious to know.

1. What's kAppVersion, in line 3? My interpreter doesn't recognize that word. I changed that line to

Sorry about that. I always initialize my script with a global variable for versioning purposes. My functions just assume that it's already been defined...

I intialize it like this:

kAppVersion = parseFloat(app.version);

2. In the case of versions below 7, on the Mac, when you say

linkJumper.execute();

it opens the file in my text editor, which is what .html files are set to open with on my computer. Is there a way to force it to open in a web browser without using doScript, which will not open in a modal state?

This is an academic matter for me, as the typical user always has .html files set to open in browsers, and also everyone at my place of work is running CS5. But I'd be curious to know.

Good point. That's another reason why Gerald's method of writing the files is better...