Search found 1030 matches

by phspaelti
2019-11-04 08:14:14
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 1480

Re: Get the caret out of a table

There are two ways to select a table: (1) if you do "Select All" twice, Nisus will select all the cells of the table, or (2) if you use the mouse to select from right before the table to right after the table. These two ways are quite distinct from Nisus' point of view. For Nisus a table is treated ...
by phspaelti
2019-10-26 03:31:53
Forum: Nisus Writer Pro
Topic: deleting paragraph style B and replacing it with paragraph style A
Replies: 13
Views: 1723

Re: deleting paragraph style B and replacing it with paragraph style A

Hello shmuel, One thing that was bothering me a bit was that although after all occurrences of text in paragraph style B have been replaced this way by paragraph style A, when I then went on to delete paragraph style B from the style sheet, I was told that "This style is currently used in the docume...
by phspaelti
2019-10-26 00:31:42
Forum: Nisus Writer Pro
Topic: deleting paragraph style B and replacing it with paragraph style A
Replies: 13
Views: 1723

Re: deleting paragraph style B and replacing it with paragraph style A

I would to know where I can find "Choose Paragraph Style:Select All in Style" in the menus? I can see there is a "Paragraph Style" in the Format menu but it does not have a "Select All in Style" option. Really? Mine does. Select_All_In_Style_1.jpg Also you should be able to find it in the Paragraph...
by phspaelti
2019-10-25 08:11:07
Forum: Nisus Writer Pro
Topic: removing attribute overrides in Footnote Note Style
Replies: 5
Views: 841

Re: removing attribute overrides in Footnote Note Style

But can I ask you, as a real expert, is there a way to select all footnotes without having to move the cursor into a footnote first, perhaps using a macro? The normal way to do this would indeed be to click in a footnote and then do "Select All" twice. (The first selects, the note, the second selec...
by phspaelti
2019-10-25 02:48:46
Forum: Nisus Writer Pro
Topic: removing attribute overrides in Footnote Note Style
Replies: 5
Views: 841

Re: removing attribute overrides in Footnote Note Style

Hello Shmuel and welcome to Nisus, The first thing to be aware of is that the Note Style "Footnote" does not really have anything to with the text styling of the footnotes, but rather it determines other aspects of the footnote such as numbering etc. You can apply any other kind of text formatting y...
by phspaelti
2019-10-25 02:40:00
Forum: Nisus Writer Pro
Topic: deleting paragraph style B and replacing it with paragraph style A
Replies: 13
Views: 1723

Re: deleting paragraph style B and replacing it with paragraph style A

With all respect to Adrian, the more straightforward method is to place your cursor in a paragraph with Paragraph Style B and then:
  1. Choose Paragraph Style:Select All in Style
  2. Apply the desired Paragraph Style A
Find is not really needed for this.
by phspaelti
2019-10-15 08:28:16
Forum: Nisus Writer Pro
Topic: Problem in saving new files
Replies: 4
Views: 1283

Re: Problem in saving new files

I have recently encountered this as well. In my case this had nothing to do with the Nisus New File. It happened when I opened some (very old?) existing file. Nisus suddenly asked whether I wanted to discard the formatting even though the file was .rtf. I can't be sure at this time, but I think I en...
by phspaelti
2019-10-02 05:57:20
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 3388

Re: Turning an integer into an array of its digits

$my1997keys = Array.new() foreach $key, value in $myhash if $value.find('1997') $my1997keys.push $key end end Pulling these keys into an Array may be useful, if you want to process them further, perhaps repeatedly. But since you will most likely need to loop through them again to do anything, you c...
by phspaelti
2019-10-02 04:41:18
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 3388

Re: Turning an integer into an array of its digits

If the hash sample you are giving us is representative you could achieve this with code like the following, which is just a variant of the code I provided earlier for creating a reverse hash. $subhash = Hash.new() foreach $key, $value in $myhash if $value.find('1997') $subhash{$key} = $value end end...
by phspaelti
2019-09-29 04:55:49
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 3388

Re: Turning an integer into an array of its digits

But how can I retrieve the key if I know the value? A hash is a one-way function. So, you cannot do that. In fact since many keys may map to the same value, it may be physically impossible to "reverse the hash". If you did want to do that you would have to use a foreach loop and loop over the keys ...
by phspaelti
2019-09-27 22:02:24
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 3388

Re: Turning an integer into an array of its digits

To get the binary forms I use a hash, and that is also why I copy its results with the clipboard to make use of it in the actual macro manipulating them. (Or is there a better way to make use of the output of one macro in another macro?) The best way to pass such info between macros is to use a Reg...
by phspaelti
2019-09-27 09:28:39
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 3388

Re: Turning an integer into an array of its digits

Well, yes. Once you write out the array in the form '("1", "2", "3", "4", "5")' on the clipboard then it stops being an array, and now it's just a piece of text. So then you couldn't use the command .appendValuesFromArray . It's important to understand that internally an array is a complicated struc...
by phspaelti
2019-09-27 07:57:58
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 3388

Re: Turning an integer into an array of its digits

If you want to add the digits from $list into $arr you can use: $arr = Array.new $arr.appendValuesFromArray $list But $list is already an array. So the only reason to do this is if you want to combine several arrays together. And as you can see from your own experiment, Nisus arrays can themselves h...
by phspaelti
2019-09-09 16:03:38
Forum: Nisus Writer Pro Macros
Topic: Find/replace in each paragraph of the selection
Replies: 10
Views: 2138

Re: Find/replace in each paragraph of the selection

1. Find in Selection - Method 1. I'm afraid I don't understand your hint. Could you please give a worked out example? Find '^.+?\t\d+', 'Eas' $results = $doc.textSelections … … I just needed to modify a bit the syntax since the Selection object doesn't have a .range property: Sorry about that. Actu...
by phspaelti
2019-09-09 04:47:09
Forum: Nisus Writer Pro Macros
Topic: Find/replace in each paragraph of the selection
Replies: 10
Views: 2138

Re: Find/replace in each paragraph of the selection

Ah, yes, these are good questions. 1. Find in Selection The macro command .find can unfortunately not be limited to a selection, the way the menu command can. There are a couple of ways to work around this. Method 1: You can do the initial find using the menu command "Find in Selection" and then use...