Search found 1300 matches

by phspaelti
2022-03-24 04:18:09
Forum: Nisus Writer Pro
Topic: Odd position of commands in find and replace
Replies: 8
Views: 3405

Re: Odd position of commands in find and replace

To explain a bit more clearly what I meant: The Powerfind "Bubbles" -- capture symbols, repeat symbols, wildcards, etc. -- do not seem to have any line height. If your expression consists only of such bubbles then they will slip above the limit of the find box (as in your second image). If...
by phspaelti
2022-03-23 10:54:35
Forum: Nisus Writer Pro
Topic: Odd position of commands in find and replace
Replies: 8
Views: 3405

Re: Odd position of commands in find and replace

Is there a way of avoiding this? Use Powerfind Pro :wink: The behavior of the PowerFind bubbles seems to have changed over the years. Now they don't even look like bubbles anymore. It seems as if the current bubble font doesn't have a correct setting for line height, which seems to be why they disa...
by phspaelti
2022-03-21 09:24:22
Forum: Nisus Writer Pro Macros
Topic: String interpolation question
Replies: 4
Views: 2081

Re: String interpolation question

Thanks Martin,
Yes, same as with johseb's suggestion, somehow I was so caught up in a particular idea, that I didn't think of the obvious. Now that I think it over, there are so many ways to do it… :drunk:
by phspaelti
2022-03-20 10:04:22
Forum: Nisus Writer Pro Macros
Topic: String interpolation question
Replies: 4
Views: 2081

Re: String interpolation question

johseb, thank you! Actually the zero-width space idea did occur to me. That would work, if it were just about the visual result. But since I need this for a case of mark-up I really need it without any space. However your idea did point me to one obvious solution, which is I could just use a double ...
by phspaelti
2022-03-20 02:33:02
Forum: Nisus Writer Pro Macros
Topic: String interpolation question
Replies: 4
Views: 2081

String interpolation question

How can one interpolate a variable name between alphabetic letters? I want to create a string with an optional symbol that needs to appear right before an alphabetic character. As an example imagine trying to create the string '+voice' or '-voice'. If I create a string variable $plusminus, which con...
by phspaelti
2022-03-11 00:36:24
Forum: Nisus Writer Pro Macros
Topic: How to search for text and apply a style to it
Replies: 9
Views: 3489

Re: How to search for text and apply a style to it

Thanks Adrian, for elaborating my intentions. My purpose is different. In each file I have saved several emails not just one. There will be several "From:"'s and several "Subject:"'s, etc. So the macro should find each "From:", select the line and apply the Heading 1 st...
by phspaelti
2022-03-10 08:43:02
Forum: Nisus Writer Pro Macros
Topic: How to search for text and apply a style to it
Replies: 9
Views: 3489

Re: How to search for text and apply a style to it

For this particular task finding bits and applying styles (that exist in your file) you can do this quite simply. if Find All '^From\:.+', 'Ea' Heading 1 end I am using the "if" clause, so that we can skip the formatting command if the Find is unsuccessful. You can just chain a series of s...
by phspaelti
2022-02-28 20:53:50
Forum: Nisus Writer Pro
Topic: Save shape styles?
Replies: 5
Views: 2243

Re: Save shape styles?

However this property is described as following value semantics which would seem to mean that it can't be set. This is either a feint to keep out the unwary, or an undocumented change in behavior. In fact $myFloatingContent.strokeAttributes = $myLineAttributes seems to work just fine, Confusion on ...
by phspaelti
2022-02-28 08:07:33
Forum: Nisus Writer Pro
Topic: Save shape styles?
Replies: 5
Views: 2243

Re: Save shape styles?

Finally I should also mention macro control of stroke attributes for inline images. Since the stroke attributes can be set using menu commands, you can hard-code a specific set of attributes with a macro like this: $lineStyleMenu = Menu.menuAtPath(":Tools:Shape Stroke:Line Style").submenus...
by phspaelti
2022-02-28 07:45:57
Forum: Nisus Writer Pro
Topic: Save shape styles?
Replies: 5
Views: 2243

Re: Save shape styles?

This is an area of NWP that is a total mess. The behavior is just all over the place. Let's consider some things that work. 1. Images can be inline or floating. If your image is floating, you are in luck! You can use the menu command "Edit > Copy > Copy Shape Appearance". Then you can past...
by phspaelti
2022-02-01 02:16:11
Forum: Nisus Writer Pro
Topic: Ability to insert sequential number?
Replies: 4
Views: 1734

Re: Ability to insert sequential number?

Here are my 2¢ on the subject. If what you want is for this "page number" to appear in the header or footer, but to only change when the next "page" actually starts, then Martin's suggestion is the best way to go. But another way to get sequential numbers that stay sequential is ...
by phspaelti
2021-11-29 20:28:41
Forum: Nisus Writer Pro Macros
Topic: Replacing text in a text object
Replies: 2
Views: 3948

Re: Replacing text in a text object

As a test case try:

Code: Select all

$text = "Mississippi"
$result = $text.findAndReplace 'i', '*', 'a'
prompt $text, $result
by phspaelti
2021-11-29 20:22:57
Forum: Nisus Writer Pro Macros
Topic: Replacing text in a text object
Replies: 2
Views: 3948

Re: Replacing text in a text object

Starting with the solution, you should remove the "$text = " from your line of code. The reason is the ".findAndReplace" command will perform on your variable, but the returned result will be an (array of) selection(s). Probably in the case you tested, there weren't any hits? Or ...
by phspaelti
2021-11-16 19:36:52
Forum: Nisus Writer Pro
Topic: Converting .rtf charts to .html and centering them on the web.
Replies: 4
Views: 3767

Re: Converting .rtf charts to .html and centering them on the web.

phspaelti wrote: 2021-11-16 19:31:15 Writing a CSS block for each paragraph, no matter how redundant (yuck)
Actually this is unfair on my part. It does reuse formatting statements for paragraphs with the same setting.
by phspaelti
2021-11-16 19:31:15
Forum: Nisus Writer Pro
Topic: Converting .rtf charts to .html and centering them on the web.
Replies: 4
Views: 3767

Re: Converting .rtf charts to .html and centering them on the web.

And now in the spirit of TMI: The way the generator works is roughly as follows. It turns the tables into HTML tables (yeah!) Then it wraps every paragraph in <p> tags (ugh) It gives all the paragraphs a pXX class attribute. It looks like it numbers every paragraph individually. (Yikes!) Then it pac...