Strikethrough

Get help using and writing Nisus Writer Pro macros.
Post Reply
paieye
Posts: 53
Joined: 2020-02-07 10:57:10

Strikethrough

Post by paieye »

Is there a macro for this ? If not, could some kind person tell me what are the steps that I need to take to create one ?
User avatar
xiamenese
Posts: 543
Joined: 2006-12-08 00:46:44
Location: London or Exeter, UK

Re: Strikethrough

Post by xiamenese »

Why do you need a macro? Why not just set a shortcut (Preferences > Menu Keys > Format > Strikethrough, where you can set shortcuts for different types of strikethrough, including colour)?

Just wondering.

Mark
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Strikethrough

Post by phspaelti »

Mark, forever the sceptic about macros :wink:

Well, he's got a point. If all you are trying to do is apply strikethrough to the current selection, then there isn't much point to a macro. And depending on the task you may be better off using any combination of: a keyboard shortcut, using a character style, or Find and Replace.

A macro might be useful if you want it to be one step in a bigger task. Another use might be to create color specific strikethroughs.

In a macro to apply strikethrough to the current selection you can write on one line of the macro:

Code: Select all

Strikethrough:single
If you want to create a command that gives you hotpink strikethrough you can do it like this:

Code: Select all

$hotpink = Color.newWithHexTriplet 'FF69B4'
Set Strikethrough Color $hotpink
Strikethrough:single
philip
User avatar
xiamenese
Posts: 543
Joined: 2006-12-08 00:46:44
Location: London or Exeter, UK

Re: Strikethrough

Post by xiamenese »

phspaelti wrote: 2020-06-26 02:51:06 Mark, forever the sceptic about macros :wink:

Well, he's got a point. If all you are trying to do is apply strikethrough to the current selection, then there isn't much point to a macro. And depending on the task you may be better off using any combination of: a keyboard shortcut, using a character style, or Find and Replace.
<snip>
Not really a sceptic! :) It's just that for most things I do, I don't need macros, so it intrigues me if someone wants a macro to do something like this and I wonder why.

I have one big macro—made largely by Martin for me—that I run all the time. I needed it to convert an RTF exported from Scrivener v.2—which only had a "format painter", so I used slight variations in colour that could be searched for—into proper styles in NWP, importing a style sheet, marking all Chinese for language and various other such things. Although, Scrivener v. 3 has styles, I still use the macro, though I don't have to rely on colour variations.

There are a couple of others I've downloaded that I do use periodically, but I'm not doing things that running macros would save me much time.

:)

Mark
Post Reply