Search found 1050 matches

by phspaelti
2020-02-20 09:13:11
Forum: Nisus Writer Pro
Topic: Numbering style queries
Replies: 4
Views: 100

Re: Numbering style queries

2. for the first level, I would like the style to be so that the number is not in bold, but the text is in bold. But this does not seem possible. This can also be achieved with a style, but this time a character style. Call it "First Level Number" and give it the attribute "Unbold". It seems to do ...
by phspaelti
2020-01-31 19:07:20
Forum: Nisus Writer Pro Macros
Topic: Join files macro - headers and footers
Replies: 4
Views: 222

Re: Join files macro - headers and footers

Having suggested the above "hack", it must be said that this approach is likely to be brittle. As far as I can make out, there is no way to know which header text object belongs to which section break, especially if some of the section breaks do not have the "different headers" on. A setting for "di...
by phspaelti
2020-01-31 18:41:00
Forum: Nisus Writer Pro Macros
Topic: Join files macro - headers and footers
Replies: 4
Views: 222

Re: Join files macro - headers and footers

While I sincerely hope that Nisus adds a "Section" object (and maybe a "Header/Footer" object, and/or a ".allHeaders/Footers" property to the Document object), I have to say it is possible to copy headers from one document to the other. Ideally the Section Object would allow for control of margins, ...
by phspaelti
2020-01-18 07:56:32
Forum: Nisus Writer Pro
Topic: NWP 3.0.4 How to assign menu key to Insert > Hyperlink > Remove Link
Replies: 3
Views: 488

Re: NWP 3.0.4 How to assign menu key to Insert > Hyperlink > Remove Link

Screen Shot 2020-01-19 at 24.54.28 .png
Screen Shot 2020-01-19 at 24.54.28 .png (160.96 KiB) Viewed 484 times
by phspaelti
2019-12-29 18:12:50
Forum: Nisus Writer Pro Macros
Topic: Foreach Command and Variable Scope
Replies: 2
Views: 504

Re: Foreach Command and Variable Scope

You've got that exactly right. The iterator variable of the foreach loop is a local copy. So changing it does not persist beyond the loop. One way to achieve what you want is to use the index to access the original. Note that the foreach loop has a variant that allows you to get the index of the cur...
by phspaelti
2019-12-27 19:34:43
Forum: Nisus Writer Pro Macros
Topic: Boolean Operation Evaluation
Replies: 3
Views: 1297

Re: Boolean Operation Evaluation

Hello Bob, Have you tried them? :wink: The point you bring up is moot, since Nisus does not allow you to combine different operators in one expression. The work around that it does allow is for you to use parentheses. So you will have to specify the operator precedence yourself using parentheses any...
by phspaelti
2019-12-27 16:46:03
Forum: Nisus Writer Pro
Topic: How to prevent text to be modified
Replies: 14
Views: 2003

Re: How to prevent text to be modified

(2) Create a Macro called "Select All Except". It has two lines:– Find All @Text<(?:.|\n|\f)+>, 'Eau' Invert Selection In the first line, you need to apply the “Skip Me” Style to the string between “<“ and ”>”, but don’t include “<“ or ”>”. Now save the Macro. In order to avoid the need to mess aro...
by phspaelti
2019-12-27 16:28:04
Forum: Nisus Writer Pro
Topic: How to prevent text to be modified
Replies: 14
Views: 2003

Re: How to prevent text to be modified

At the very least, I would like to have the option to set the scope to “In Selection” using a modifier key. So a macro to do this would be: $find = Read Find Expression Find $find, '!*s' This uses the '*' to preserve all other options. And a macro to reset to full document search would be: $find = ...
by phspaelti
2019-12-27 16:05:01
Forum: Nisus Writer Pro
Topic: How to prevent text to be modified
Replies: 14
Views: 2003

Re: How to prevent text to be modified

I know of no inbuilt way to reset all the Find & Replace parameters to some default set. From the macro reference (under Find and Replace options):     !    Copy text/options into the Find & Replace dialog instead of doing an actual find/replace. So you can write a one line macro like this: Find ''...
by phspaelti
2019-12-23 10:09:53
Forum: Nisus Writer Pro
Topic: Disable "Center the Cursor"
Replies: 2
Views: 943

Re: Disable "Center the Cursor"

Make sure View > Typewriter Scrolling is unchecked.
by phspaelti
2019-12-23 09:54:23
Forum: Nisus Writer Pro Macros
Topic: Why does the Split object surround everything with quotation marks?
Replies: 4
Views: 679

Re: Why does the Split object surround everything with quotation marks?

And one more point: You mention "valid CSV". If the stuff you are trying to split into fields is CSV you might note that the .split command will not give you the correct result in the general case, since quoted fields will be used to protect commas within fields. But I'm sure you know that already. ...
by phspaelti
2019-12-23 09:24:37
Forum: Nisus Writer Pro Macros
Topic: Why does the Split object surround everything with quotation marks?
Replies: 4
Views: 679

Re: Why does the Split object surround everything with quotation marks?

Now let's address the efficiency issue. Your current code keeps switching back and forth between two documents using the GUI. It also collects the paragraph info one paragraph at a time. The much more efficient method is to locate the paragraphs in $TempDoc first , then assemble the info, then switc...
by phspaelti
2019-12-23 09:04:59
Forum: Nisus Writer Pro Macros
Topic: Why does the Split object surround everything with quotation marks?
Replies: 4
Views: 679

Re: Why does the Split object surround everything with quotation marks?

Hello Bob, Just to answer your immediate question, it isn't the the .split command that is putting quotes around things, it's the Type text command that's doing that. Or to put it more accurately, the Type text creates a string context; your variable $TheFields is an array, so in the string context ...
by phspaelti
2019-12-17 18:27:30
Forum: Nisus Writer Pro Macros
Topic: Extremely basic question: How do I know if I found something
Replies: 6
Views: 874

Re: Extremely basic question: How do I know if I found something

Obviously speed isn't going to be a real factor if the macro is simply checking one file. As a test I had it check 4 words in the Nisus Macro Language reference 1000 times. The Find version took about 17 seconds , while the .find version took about 2. But most of all the Find version was busy jumpin...
by phspaelti
2019-12-17 16:43:19
Forum: Nisus Writer Pro Macros
Topic: Extremely basic question: How do I know if I found something
Replies: 6
Views: 874

Re: Extremely basic question: How do I know if I found something

…however if you use .findAll you will get an array of Text Selections. When the find is unsuccessful then … .findAll still returns an Array, just an empty one. And so if you wanted to do the same exercise in a situation where you need to use .findAll , then you will need to test the .count of the r...