Search found 1251 matches

by phspaelti
2022-12-01 05:54:27
Forum: Nisus Writer Pro Macros
Topic: multi-file search
Replies: 10
Views: 252

Re: multi-file search

Here is another solution to this problem to take advantage of the search feature in the Document Manager described by Þorvarður. The macro creates a user group and adds all the files in the folder as well as all files in all subfolders. That way they will be collected in one group and can be searche...
by phspaelti
2022-12-01 00:15:45
Forum: Nisus Writer Pro Macros
Topic: multi-file search
Replies: 10
Views: 252

Re: multi-file search

Side-stepping the philosophical discussions, here is my attempt at a macro for solving this problem. It will search through all sub-folders for relevant files and check them against the find dialog. It will then let you how many it found, and ask whether you want to open them and show the results. Y...
by phspaelti
2022-11-16 22:25:46
Forum: Nisus Writer Pro Macros
Topic: Help with Macro sentence spacing
Replies: 8
Views: 291

Re: Help with Macro sentence spacing

Indeed. In all likelihood it was a "clean up" macro that tried to enforce one and only one space after periods, perhaps excluding periods followed by quotation marks. Which brings up the question how one might write such a macro that avoided doing that. My first reaction to this problem wa...
by phspaelti
2022-11-05 05:18:40
Forum: Nisus Writer Pro Macros
Topic: Table: How to find coordinates of selected cells
Replies: 4
Views: 289

Re: Table: How to find coordinates of selected cells

Hello js, I see what you are saying. Nisus does have the Selection object which can work with non-continguous selections, but this object does not have direct access to the cells in the selection. You will have to loop through all the TableSelections within the selection. If your TableSelection(s) d...
by phspaelti
2022-11-05 05:07:47
Forum: Nisus Writer Pro Macros
Topic: Loop through open documents
Replies: 3
Views: 175

Re: Loop through open documents

As Adrian says Document.openDocuments should work. The following code will apply My Fantastic Macro to all open documents.

Code: Select all

foreach $doc in Document.openDocuments
Document.setActive $doc
My Fantastic Macro
end
by phspaelti
2022-11-03 05:20:18
Forum: Nisus Writer Pro Macros
Topic: Table: How to find coordinates of selected cells
Replies: 4
Views: 289

Re: Table: How to find coordinates of selected cells

First of all, remember that this is Nisus, so if you want to find something you can always use Find/Powerfind. But otherwise it will depend on what you want to achieve If you have a TableCell object you can use the .row and .column properties If you have a Table object you can get the number of rows...
by phspaelti
2022-10-30 04:27:47
Forum: Nisus Writer Pro Macros
Topic: Editing table cell borders
Replies: 3
Views: 191

Re: Editing table cell borders

Also: can I change the whole table at one go, or do I have to write a couple of loops to address every cell and change its borders individually? Yes, you can change the whole table in one go. For that you should work with table selections. For example: $doc = Document.active Select Table 1 $tblSel ...
by phspaelti
2022-10-30 04:18:10
Forum: Nisus Writer Pro Macros
Topic: Editing table cell borders
Replies: 3
Views: 191

Re: Editing table cell borders

As the message says you need a line attribute object not text: Select Table 1 $thisTable = Table.selectedTable $aCell = $thisTable.cellAtRowAndColumn 1, 1 $lineAttr = LineAttributes.newWithLineType 'invisible' $aCell.setLineAttributesForEdges $lineAttr, 'top' You can, if you prefer combine it like t...
by phspaelti
2022-10-05 20:22:53
Forum: Nisus Writer Pro
Topic: Automatic Figure Titles
Replies: 5
Views: 462

Re: Automatic Figure Titles

That's what Cross-references are for. NWP allows you to cross-reference items like list items or bookmarks. So you will need to choose one. For example using Bookmarks Bookmark the relevant bit of text Go to the place you want to insert and choose "Insert Cross-reference" Choose the proper...
by phspaelti
2022-10-02 19:36:44
Forum: Nisus Writer Pro Macros
Topic: Select a list as a group.
Replies: 5
Views: 462

Re: Select a list as a group.

And now to this. I was actually looking to select each list number or bullet and put a leading and trailing CR. Here you are saying select each list number or bullet . But what your example is doing is selecting the whole list as a unit. And I suspect that that is why Martin was asking what you are ...
by phspaelti
2022-10-02 18:57:11
Forum: Nisus Writer Pro Macros
Topic: Select a list as a group.
Replies: 5
Views: 462

Re: Select a list as a group.

Hello Lou, Did that bit of macro code ever work in the past? First about '\0'. '\0' refers to the found text. So it couldn't have any meaning in a "Find (All)" expression. That would amount to saying 'find what you find' :lol: It also doesn't work in Replace All because Replace All doesn't...
by phspaelti
2022-09-29 20:29:27
Forum: Nisus Writer Pro
Topic: Closing Quotation Marks
Replies: 6
Views: 459

Re: Closing Quotation Marks

Hello Ulrich,
Here is a macro you can try that should insert joiners in front of such quotes. Note that the macro is hard-coded to work for codepoint \x{201C} which is the closing quote used in your sample. If your document includes other close quote characters it will need to be adjusted.
by phspaelti
2022-09-19 00:11:00
Forum: Nisus Writer Pro
Topic: Search & replace inside indexing codes?
Replies: 9
Views: 572

Re: Search & replace inside indexing codes?

Okay, I gave it another try. The result is appended. I also added input prompts to specify the index topics. But as I was trying to say before, for this to work "as expected" will depend on the user. Basically it always affects only exact matches of topic along with all subtopics . So if y...
by phspaelti
2022-09-18 20:35:17
Forum: Nisus Writer Pro
Topic: Search & replace inside indexing codes?
Replies: 9
Views: 572

Re: Search & replace inside indexing codes?

Hello Francisco, Sorry about that. Of course you are right, my macro would not work correctly for indexes with sub-topics. I would have to write it in a much more complicated manner. And at that point one would have to start to make decisions about what kind of cases to cover and how. NWP allows for...
by phspaelti
2022-09-18 02:45:24
Forum: Nisus Writer Pro
Topic: Search & replace inside indexing codes?
Replies: 9
Views: 572

Re: Search & replace inside indexing codes?

Hello Francisco, It's been a while that I have tried working with Indexes. While Nisus allows you to index using PowerFind I think this only means using Find to find text in the document to index. It doesn't allow for searching the index topics. For that you seem to need a macro. I am adding here a ...