Search found 1167 matches

by phspaelti
2021-03-01 01:34:47
Forum: Nisus Writer Pro
Topic: Initials
Replies: 18
Views: 13053

Re: Initials

Here is my 2 cents on this issue. I am attaching a group of 3 macros which might help a bit. Let's assume you have one drop cap in your document already. Place your cursor in a subsequent paragraph where you want another. Then run the first macro: Insert DropCap At Current Paragraph This macro will ...
by phspaelti
2021-02-26 20:33:40
Forum: Nisus Writer Pro Macros
Topic: Compare and Remove Duplicates — 2 Lists
Replies: 5
Views: 1968

Re: Compare and Remove Duplicates — 2 Lists

Adrian's method is fine, and I use it all the time, but there are number of caveats. Strictly speaking Adrian's method creates a combined list and then removes items that can be paired. If either list contains duplicates, this could change the result. Also it will leave the unique items from either ...
by phspaelti
2021-02-25 01:45:55
Forum: Nisus Writer Pro
Topic: Creating a document that can be imported into WordPress
Replies: 4
Views: 1822

Re: Creating a document that can be imported into WordPress

I thought the whole point of the WordPress block editor is to allow you to write HTML without knowing how HTML works. If you want to create HTML pages outside of WordPress, then you should ditch the whole block editor concept.
by phspaelti
2021-02-18 00:05:54
Forum: Nisus Writer Pro Macros
Topic: Macro Syntax Coloring macro(s)
Replies: 2
Views: 1478

Re: Macro Syntax Coloring macro(s)

Actually, I should put an important warning here.

This macro somewhat crudely obliterates prior formatting in the file. This will be a serious problem if your macro uses formatted text strings or attribute sensitive Find and Replace. So please use it responsibly :D
by phspaelti
2021-02-17 21:58:43
Forum: Nisus Writer Pro Macros
Topic: using characterCase attribute
Replies: 10
Views: 2681

Re: using characterCase attribute

ToggleCase (multi).nwm
(8.05 KiB) Downloaded 196 times
by phspaelti
2021-02-17 20:27:05
Forum: Nisus Writer Pro Macros
Topic: Macro Syntax Coloring macro(s)
Replies: 2
Views: 1478

Macro Syntax Coloring macro(s)

Since I was asked about this, I'm posting here the macros that I use for syntax coloring in my macros. They require the use of appropriately named styles in the document.
by phspaelti
2021-02-17 17:01:20
Forum: Nisus Writer Pro Macros
Topic: using characterCase attribute
Replies: 10
Views: 2681

Re: using characterCase attribute

Hello again Brad, 1) if nothing selected, select one character to right of the caret 2) paste the modified text back into the document — used the clipboard. Wondering, is there a more elegant solution to replace the toggled text than using the clipboard?? First to part 1. Clearly you have found a so...
by phspaelti
2021-02-17 09:06:03
Forum: Nisus Writer Pro Macros
Topic: using characterCase attribute
Replies: 10
Views: 2681

Re: using characterCase attribute

Since the "To UPPERCASE" and "to lowercase" work, as you point out, you can leverage them to create a togglecase macro as appended.
by phspaelti
2021-02-13 11:23:09
Forum: Nisus Writer Pro Macros
Topic: How to use the command 'Scan Document' in a longer macro
Replies: 6
Views: 2248

Re: How to use the command 'Scan Document' in a longer macro

The fundamental problem that you will have here is that your Mac is multi-tasking. "Scan Document" may look like a Nisus command to you, but Nisus just hands off control to Bookends, and then continues to execute the macro without waiting for Bookends to complete. I thought Nisus macro language had ...
by phspaelti
2021-02-12 19:45:57
Forum: Nisus Writer Pro Macros
Topic: Joining Files
Replies: 3
Views: 2128

Re: Joining Files

martin wrote:
2021-02-09 09:05:42
The Nisus macro language should give macros control over section properties. Thank you!
Yes!
by phspaelti
2021-01-30 05:27:25
Forum: Nisus Writer Pro Macros
Topic: Getting a pop-up window for a paragraph
Replies: 4
Views: 2024

Re: Getting a pop-up window for a paragraph

A belated follow up about a Nisus feature that I had forgotten about. Nisus has a command "Edit > Select > Show Selection in Results Window", which would also achieve the desired effect.
by phspaelti
2021-01-28 06:40:04
Forum: Nisus Writer Pro Macros
Topic: Getting a pop-up window for a paragraph
Replies: 4
Views: 2024

Re: Getting a pop-up window for a paragraph

Actually the following would also work, but the result(s) display a bit different:

Code: Select all

$doc = Document.active
Show Find Results $doc.textSelections, 'Selected Paragraphs'
by phspaelti
2021-01-28 06:23:08
Forum: Nisus Writer Pro Macros
Topic: Getting a pop-up window for a paragraph
Replies: 4
Views: 2024

Re: Getting a pop-up window for a paragraph

Hi pereelmagne, The Show Find Results command expects as argument a Hash where the key(s) have arrays of selection objects as values. So you could modify your code as follows: Select Paragraph $selection = TextSelection.active $matches = Hash.new 'Selected Paragraph', Array.new($selection) Show Find...
by phspaelti
2021-01-25 02:27:42
Forum: Nisus Writer Pro
Topic: Prevent word-wrap
Replies: 4
Views: 2286

Re: Prevent word-wrap

You can use the zero-width joiner U+200D between the two parts.
by phspaelti
2021-01-25 01:21:46
Forum: Nisus Writer Pro
Topic: How to replace png image with PDF version and keep size and spacing?
Replies: 10
Views: 3359

Re: How to replace png image with PDF version and keep size and spacing?

So here is an improved version that should skip images for which it has no pdf file.