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 » 2007-12-06 12:20:43

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: 4251
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin » 2007-12-06 14:43:58

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 » 2008-01-15 12:30:22

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: 4251
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin » 2008-01-15 13:47:50

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 » 2008-01-15 16:39:24

Yup, that does it. Thanks.

js
Posts: 229
Joined: 2007-04-12 14:59:36

Post by js » 2008-02-04 01:04:39

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: 4251
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin » 2008-02-04 16:12:32

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