Strikethrough
Strikethrough
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 ?
Re: Strikethrough
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
Just wondering.
Mark
Re: Strikethrough
Mark, forever the sceptic about macros
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:
If you want to create a command that gives you hotpink strikethrough you can do it like this:

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
Code: Select all
$hotpink = Color.newWithHexTriplet 'FF69B4'
Set Strikethrough Color $hotpink
Strikethrough:single
philip
Re: Strikethrough
Not really a sceptic!phspaelti wrote: ↑2020-06-26 02:51:06 Mark, forever the sceptic about macros![]()
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>

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