Macro to Choose Highlighting Color

Get help using and writing Nisus Writer Pro macros.
Post Reply
lawrencegoodman
Posts: 30
Joined: 2007-07-30 12:06:49

Macro to Choose Highlighting Color

Post by lawrencegoodman »

So I use various highlighting colors throughout a document, and was wondering if there was a way to build a macro where you could call up a menu that listed each color and then, by selecting a number, you would be able to choose a specific color.

Any help would be much appreciated.
User avatar
martin
Official Nisus Person
Posts: 5228
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin »

I'm not sure I understand, but if I do, here's a macro to get you started:

Code: Select all

$color = Prompt Options “What highlight color should be applied?”, “Please choose the color:”, “Apply”, “Red”, “Green”, “Blue”
Menu “:Format:Highlight:$color”
Hopefully the way to extend the macro is clear. If not, let me know.
lawrencegoodman
Posts: 30
Joined: 2007-07-30 12:06:49

Post by lawrencegoodman »

This macro has been very helpful. The one limitation is that I have to go to the mouse to choose the colors.

Is there any way to make it so I can tab between the options? Alternatively, I could type g for green or r for red—something like that.

Thanks.
User avatar
martin
Official Nisus Person
Posts: 5228
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin »

lawrencegoodman wrote:Is there any way to make it so I can tab between the options?
It may be because I've enabled "full keyboard access" in my system preferences, but when the radio option buttons have focus I can use the up/down arrow keys to select the option I want.
lawrencegoodman
Posts: 30
Joined: 2007-07-30 12:06:49

Post by lawrencegoodman »

Yup, that does it. Thanks.
js
Posts: 259
Joined: 2007-04-12 14:59:36

Post by js »

martin wrote:I'm not sure I understand, but if I do, here's a macro to get you started:

Code: Select all

$color = Prompt Options “What highlight color should be applied?”, “Please choose the color:”, “Apply”, “Red”, “Green”, “Blue”
Menu “:Format:Highlight:$color”
Hopefully the way to extend the macro is clear. If not, let me know.
I guess "Red" was not such a good example here (;-|
This said, is there any means ot plans to extend the abvailable hilite colors?
User avatar
martin
Official Nisus Person
Posts: 5228
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin »

It's been requested a few times I know, and it is on the official list of additions. I can't say when you'll see it though.
Post Reply