Search found 1020 matches

by phspaelti
2019-11-06 01:13:05
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 968

Re: Get the caret out of a table

You showed how to create shading attributes with a macro, and then asked: But maybe your problem is something else? How are you getting/making the table selection? To answer that: I made selections manually, by selecting (some or all) text within some cells. The menu "Show Paragraph Shading Palette...
by phspaelti
2019-11-06 00:31:09
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 968

Re: Get the caret out of a table

js wrote:
2019-11-05 09:21:22
About your short form of the macro you say "that should be fixed now". Did you maybe intend to post the fixed code?
I just fixed the code in the original post.
by phspaelti
2019-11-04 11:06:47
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 968

Re: Get the caret out of a table

Thank you, Philip. Outquoting the line "$textRange.location = $textRange.bound" works fine. Some day I might understand why )=; Here are the relevant lines $text = $table.enclosingText $textRange = $table.enclosingTextRange $textRange.location = $textRange.bound $textRange.length = 0 The first line...
by phspaelti
2019-11-04 10:41:15
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 968

Re: Get the caret out of a table

js wrote:
2019-11-04 10:35:26
Your simplified version produces a system complaint: 'The Table object does not have a "text" property'.
Sorry about that. That should be fixed now.
by phspaelti
2019-11-04 08:32:05
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 968

Re: Get the caret out of a table

I have another problem with tables: I tried in vain to find out how to get a macro to apply shading to selected single cells (rather than to set shading to paragraphs which produces shading to the whole row containing the selected cells). Assuming you have created some shading attributes and stored...
by phspaelti
2019-11-04 08:14:14
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 968

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: 1154

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: 1154

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: 480

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: 480

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: 1154

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: 931

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: 2829

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: 2829

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: 2829

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 ...