Copy link to clipboard
Copied
I can only find example scripts that work on complete files. What I want, is a script that works on currently selected text.
If I can create a macro that applies a specific paragraph style to all currently selected paragraphs, or a character style to currently selected text, I can put that style under a shortcut key.
That way, "emphasis" or "strong" can be put under ctrl-b, for example.
If there is another way to achieve the same (in RH 9), I would be interested to hear it as well.
Kind regards,
Erwin Timmerman
Copy link to clipboard
Copied
Nope.. Scripts do not have any information about opened files, let alone text selection. A macro is the only way to go.
Greet,
Willam
Copy link to clipboard
Copied
In that case, how can I create a macro in RoboHelp that assigns a specific style to a shortcut key?
Copy link to clipboard
Copied
I think this maybe a case for a tool like Macro Express. There is nothing in RoboHelp that can help.
Copy link to clipboard
Copied
I had a quick look at Macro Express, but it seems that it only records key strokes and mouse clicks etc. This means that it only works if I have the style pod constantly open (which I do), always in the exact same position, with the same filter styles selected, and with the same CSS loaded, positioned at the same location in the scroll bar.
Am I correct in assuming this, or is there a better way to program it?
I am not sure this would be possible all the time. What's more, this script should work across multiple computers with different layouts, and with writers who don't really want to hack to get it working.
With character styles there would be the possibility to automatically switch to HTML view, cut, write <span...>, paste, write </span>, go back to design view.
But paragraph styles? That would be harder to do in HTML view, especially for multiple selected lines.