Search found 1113 matches

by phspaelti
2020-08-26 07:58:19
Forum: Nisus Writer Pro Macros
Topic: Macro to remove some applied formatting
Replies: 2
Views: 782

Re: Macro to remove some applied formatting

Of course you can do this, but you may need to be a bit careful. Generally Nisus has commands to change formatting like: Set Bold isBold as it's described in the reference. So if you have everything selected and use Set Bold @false Then all bold is removed from your document. Interestingly enough th...
by phspaelti
2020-08-25 17:42:51
Forum: Nisus Writer Pro Macros
Topic: Macro command to Import from Style Library…
Replies: 8
Views: 5372

Re: Macro command to Import from Style Library…

vwnisus wrote:
2020-08-25 09:19:00
I do not know why I had an issue before...
Computers move in mysterious ways…
by phspaelti
2020-08-25 06:53:08
Forum: Nisus Writer Pro Macros
Topic: Macro command to Import from Style Library…
Replies: 8
Views: 5372

Re: Macro command to Import from Style Library…

In your new macro, you have "~/Dropbox…" where in the earlier versions you had "/Dropbox…" without the "~". Could that be it? Says Mark a complete non-programmer! :D Well the "~" is just an abbreviation for "/Users/victor" and that would seem to be where the "Dropbox" folder is located. In principl...
by phspaelti
2020-08-24 16:56:02
Forum: Nisus Writer Pro Macros
Topic: Highlight paragraphs with border(s)
Replies: 8
Views: 1234

Re: Highlight paragraphs with border(s)

It occurs to me that there is a workaround to checking for paragraph borders. If you check the (display) attributes you can see that the paragraph borders are included, as expected. So if you cast the attributes object to a string you can search in the string representation for the presence of the r...
by phspaelti
2020-08-23 17:59:44
Forum: Nisus Writer Pro Macros
Topic: Highlight paragraphs with border(s)
Replies: 8
Views: 1234

Re: Highlight paragraphs with border(s)

How can a user guess, reading the reference guide, the correct syntax for a specific command/property? Both are equally valid. I like to put parentheses when things get long. There are some circumstances when you are required to use parentheses, basically when you need to disambiguate something. Yo...
by phspaelti
2020-08-23 10:32:50
Forum: Nisus Writer Express
Topic: 'Sum column'
Replies: 4
Views: 2512

Re: 'Sum column'

Is it possible to Sum Column in NWPro so that the total appears at the top of the column, instead of at the foot ? Alternatively, how could I write a macro for this ? It would be possible in NWPro . This here is the discussion for NWE though :? If you are using NWPro now, then you could modify the ...
by phspaelti
2020-08-23 10:17:18
Forum: Nisus Writer Pro Macros
Topic: Highlight paragraphs with border(s)
Replies: 8
Views: 1234

Re: Highlight paragraphs with border(s)

I tried using paragraphLineAttributesForEdge to no avail. That's what it says in the macro language reference in two locations. I'm suspecting that there may be a typo somewhere (maybe even in the code :? ). I've tried a few variations, but they all come back with errors. So I can't seem to check p...
by phspaelti
2020-08-20 00:17:44
Forum: Nisus Writer Pro
Topic: How to bookmark each instance of a paragraph style
Replies: 2
Views: 651

Re: How to bookmark each instance of a paragraph style

Well if all you want is to bookmark all instances of this style, and you are happy with automated names, then you can do this without any automation: Place your cursor in one instance of the style Choose "Select All in Style". This should select all instances of your numbered heading Choose "Add Boo...
by phspaelti
2020-08-16 10:16:43
Forum: Nisus Writer Pro Macros
Topic: Turning styled text into tagged text
Replies: 2
Views: 539

Re: Turning styled text into tagged text

In current NWP language you will need to use the formatting attributes. You can get the attributes for any location in the text of a document like so: $doc = Document.active # Put this at the very beginning of your code $loc = … # set to the location you want to check $attr = $doc.text.attributesAtI...
by phspaelti
2020-08-15 18:13:13
Forum: Nisus Writer Pro
Topic: Separate file into sections and then recombine
Replies: 7
Views: 1232

Re: Separate file into sections and then recombine

Hello Adrian, I think there is a bit of difference of ideas in what is meant by "Section". Nisus has a technical definition of Section which is what the original macro seemed to be aimed at. So that macro split the document at Section Breaks. But I think most people will think of sections of their d...
by phspaelti
2020-08-15 07:27:13
Forum: Nisus Writer Pro Macros
Topic: Different behavior from what looks to me like similar macros
Replies: 4
Views: 620

Re: Different behavior from what looks to me like similar macros

I just checked the online manual for NWE, and it seems it should allow you to macroize Find expressions. Since the task you are looking for can easily be achieved using "Find and Replace", aka "PowerFind", you might be able to get the same that way. The Find Expression you want looks like this: Scre...
by phspaelti
2020-08-14 22:29:34
Forum: Nisus Writer Pro Macros
Topic: Different behavior from what looks to me like similar macros
Replies: 4
Views: 620

Re: Different behavior from what looks to me like similar macros

How is this different and why? I just tested your bold macro and I don't find that it adds an extra space. I get exactly the result you are expecting. Having said that I am a Pro user not Express. It's been a long time, so I do have to ask? I know that Express does not have all the functionality of...
by phspaelti
2020-08-12 07:54:48
Forum: Nisus Writer Pro
Topic: Separate file into sections and then recombine
Replies: 7
Views: 1232

Re: Separate file into sections and then recombine

But having done it this way, it might be more appropriate to split the document by "sections" as indicated by the headings rather than the section breaks. Using section breaks might run into trouble in case the document uses sections for things like changing the number of columns for example. Let me...
by phspaelti
2020-08-12 07:47:43
Forum: Nisus Writer Pro
Topic: Separate file into sections and then recombine
Replies: 7
Views: 1232

Re: Separate file into sections and then recombine

The best approach to find sections is to use the macro command .rangeOfSectionAtIndex . You can retrieve all sections of a document with a "Kino-loop" like this: $doc = Document.active $loc = 0 while $loc < $doc.text.length $sectionRange = $doc.text.rangeOfSectionAtIndex $loc $loc = $sectionRange.bo...