Search found 151 matches

by credneb
2009-05-20 05:23:32
Forum: Nisus Writer Pro Macros
Topic: Get Paragraph number
Replies: 2
Views: 3638

Re: Get Paragraph number

Thanks for confirming that there is no way to get the paragraph number in a macro. I guess that there is likewise no way to get the number of the other objects used by the various Select (object) [i]number[/i] commands. If you can't get the number, I can't see a use for these commands -- but I'm sur...
by credneb
2009-05-19 07:26:18
Forum: Nisus Writer Pro Macros
Topic: Get Paragraph number
Replies: 2
Views: 3638

Get Paragraph number

For a variety of editing tools, I would like to select the paragraph where the insertion point is placed as a first step. This can be done using: Select Previous Paragraph Select Next Paragaph I tried Select Relative Paragraph 0 but this doesn't work. Or, it could be done using Select Paragraph (num...
by credneb
2009-05-07 09:44:13
Forum: Nisus Writer Pro
Topic: retain format of prev paragraph
Replies: 5
Views: 3246

Re: retain format of prev paragraph

Thank you for the macros. Setting up a style sheet or paragraph formatting with an autoindent is in many ways the preferred solution, but tabbed indentation is preferable because of how the documents will be used downstream, as basically straight text documents. Hard tabs preserve what little format...
by credneb
2009-05-07 06:24:07
Forum: Nisus Writer Pro
Topic: retain format of prev paragraph
Replies: 5
Views: 3246

retain format of prev paragraph

Classic has a feature that keeps the formatting from one paragraph to the next so that, e.g., if the first line in a paragraph starts with a tabbed indent, typing a return at the end of the paragraph starts the next paragraph with the insertion point after a leading tab. is this possible in Pro? I h...
by credneb
2009-04-23 06:18:28
Forum: Nisus Writer Pro Macros
Topic: registry problem (syntax?)
Replies: 2
Views: 3551

Re: registry problem (syntax?)

Martin,

Thank you very much. No need to understand the whole thing. That was all it was.

And now it's easier to remember ... save *Value* With *Name*...

Cliff Bender
by credneb
2009-04-22 14:16:33
Forum: Nisus Writer Pro Macros
Topic: registry problem (syntax?)
Replies: 2
Views: 3551

registry problem (syntax?)

So I'm making progress learning the new macro language and have several macros that work well, thanks to Martin and others. Among those are a couple that save values using the registry objects. Starting small to big, my macro for adding single glossary entries works as desired, including opening the...
by credneb
2009-03-13 14:14:26
Forum: Nisus Writer Pro Macros
Topic: splitting strings, using ranges
Replies: 4
Views: 5109

Re: splitting strings, using ranges

Perhaps I should note that I was testing by selecting the string

hello 1, dolly 2, hello dolly 3,

and the first run through showed that the selection was "hello 1" so the range <5,1> should have been OK (as it is now).
by credneb
2009-03-13 13:51:40
Forum: Nisus Writer Pro Macros
Topic: splitting strings, using ranges
Replies: 4
Views: 5109

Re: splitting strings, using ranges

Hi Martin, Thank you again. Perhaps there is another bug to report. Before changing anything, I ran the macro again and the Prompt message following the $loc = $sel.rangeOfString(' '), b line returned "the location is (Range<5,1>), the same message I now get with the corrected syntax and why I thoug...
by credneb
2009-03-13 10:39:37
Forum: Nisus Writer Pro Macros
Topic: splitting strings, using ranges
Replies: 4
Views: 5109

splitting strings, using ranges

Hello again. I've split a string of text into an array, and then for each element in the array I want to extract the part following the last space to use as a glossary abbreviation, and the entire string (incl the abbrev) as the expansion. I guess using ranges is the way to do this splitting. Prompt...
by credneb
2009-03-12 17:07:44
Forum: Nisus Writer Pro Macros
Topic: variables and interpolated literals
Replies: 3
Views: 4554

Re: variables and interpolated literals

Thank you very much for the help, AND for the unsolicited advice. It helps the learning process and I like fast...
Your revised version is much more elegant, and as an example it answers several questions.

Thanks again.
by credneb
2009-03-12 13:59:28
Forum: Nisus Writer Pro Macros
Topic: variables and interpolated literals
Replies: 3
Views: 4554

variables and interpolated literals

Getting back to learning the new macro language, I succeeded in writing a simple macro that even works. For reference, it's pasted below. It simply builds a block of lines each starting with a number followed by a tab and newline character. Following the line $text = $prefix & $firstStep I tried var...
by credneb
2007-04-26 06:17:45
Forum: Nisus Writer Pro Macros
Topic: invalid variable name
Replies: 2
Views: 7010

Ah! Thank you very much for the help (and the responses to my other posts).

Cliff Bender
by credneb
2007-04-25 19:03:31
Forum: Nisus Writer Pro Macros
Topic: invalid variable name
Replies: 2
Views: 7010

invalid variable name

Continuing learning the new macro language and therefore Perl, the first part of an effort has the variable $vprior, which causes no complaint until the last time it appears. NWP returns the error "invalid variable name on line 10" ##cInsert Prior Right Paragraph Number## $vprior = Read Clipboard cv...
by credneb
2007-04-16 18:32:38
Forum: Nisus Writer Express
Topic: Japanese in find/replace perl macro
Replies: 4
Views: 5267

Martin,

I had already downloaded the Pro beta, and fairly quickly and easily did what i wanted to do using the new macro capability, specifically the Finda and Replace command. Much faster, too.

Thank you for your help. I will use Pro from now on, likely.

Cliff Bender
by credneb
2007-04-11 17:20:17
Forum: Nisus Writer Express
Topic: Japanese in find/replace perl macro
Replies: 4
Views: 5267

Martin, Thank you for the reply. Your suggestions worked in that I can now save Japanese in the macro. The problem now is that the text written back to the document after the replace is garbage and is inserted at the cursor instead of overwriting the old text. The same thing happens running the incl...