Search found 147 matches

by credneb
2009-04-23 06:18:28
Forum: Nisus Writer Pro Macros
Topic: registry problem (syntax?)
Replies: 2
Views: 3416

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

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

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

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

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

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

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

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

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

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

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...
by credneb
2007-03-28 07:42:28
Forum: Nisus Writer Express
Topic: Japanese in find/replace perl macro
Replies: 4
Views: 5151

Japanese in find/replace perl macro

I've been working on learning NWE macros, and wrote one yesterday that does a global find/replace to remove new line codes from selected lines globally. The problem is that the find/replace strings contain Japanese characters. After saving and reopening the macro to work on it some more, the Japanes...