Long ago, Nisus Classic allowed you to do something, then capture the keystrokes in a macro. NWP won't do that, I know, but the manual says I just have to give it a "to do list." HA!
I would like two things: 1) instructions on how to create the particular macro I will discuss; 2) a methodology to determine how to create other macros. I have no idea what NWP will understand and what it won't. (P.S. I've reviewed 5 pages of macro topics and the manual).
The particular macro I want would find all instances of "People v. [insert any word here" and italicize the entire phrase.
I have tried to start small, by asking Nisus to "find (first line) all "People" (second line) Italic. (third line). When I try to run the macro, NWP tells me that it cannot recognize the term "People." How do I communicate that I want that specific word?
Worse, how will I communicate that I want the wild card word that follows "v." ?
I really really really miss my ability to create macros in Nisus Classic.
Thank you. Candace
help constructing (any) NWP macro
Re: help constructing (any) NWP macro
You can save this expression as a Nisus Writer macro (with extension nwm):Candace wrote:[...]The particular macro I want would find all instances of "People v. [insert any word here" and italicize the entire phrase.[...]
Code: Select all
Replace All 'People v. (?:\\b\\w+\\b)', '\\0', 'EU'
Re: help constructing (any) NWP macro
Very cool --- it worked! (I had to take out the formatting, then save in the font I use, or else it transformed the italicized text into the font you used -- but that's not a big deal.)
Thank you so much!. Now can someone tell me how Hamid did this, so I can do it myself? Because I thought that the ability (for non programmers) to create macros was a big selling point for NWP, but that set of expressions Hamid used certainly is beyond my (current) ken.
For instance, I would like to adapt the macro to apply to all instances of "In re [wild card]," but since I don't know how it was constructed, I don't know how to do it.
Thanks again. Candace
Thank you so much!. Now can someone tell me how Hamid did this, so I can do it myself? Because I thought that the ability (for non programmers) to create macros was a big selling point for NWP, but that set of expressions Hamid used certainly is beyond my (current) ken.
For instance, I would like to adapt the macro to apply to all instances of "In re [wild card]," but since I don't know how it was constructed, I don't know how to do it.
Thanks again. Candace
Re: help constructing (any) NWP macro
OMG, OMG! I just used the Nisus Template for Find and Replace and a glimmer of understanding is lightening my darkness. Thanks again, Hamid. Cheers, Candace
Re: help constructing (any) NWP macro
One more question --- I opened the template for find and replace in a new doc, inserted the terms I wanted, saved it as a macro, and it worked. But when I go to open it, I get a dialogue box that says Nisus doesn't recognize the application that created it (!).
I tried doing it all again and saving as rtf. first, then saving as macro, but got the same message when I tried to open the macro to edit it.
It works fine, so maybe it's not a problem == but it seems as though I'm doing something wrong. Thanks. Candace
I tried doing it all again and saving as rtf. first, then saving as macro, but got the same message when I tried to open the macro to edit it.
It works fine, so maybe it's not a problem == but it seems as though I'm doing something wrong. Thanks. Candace
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: help constructing (any) NWP macro
One handy tool is the Macroize feature in NWP's Find & Replace dialog. Just click the little "gear" icon and choose "Macroize" from the popup menu to turn the current Find & Replace dialog settings into a macro.Candace wrote:Now can someone tell me how Hamid did this, so I can do it myself?
As for learning PowerFind (text patterns), you might want to consult our user guide, or the internet at large. If you switch NWP to PowerFind Pro mode, you can use regular expressions, which are documented many places.
Writing detailed macros for the novice won't be that easy, there's lots of information to put together. But if you're just doing some replacements you should be able to manage- feel free to ask us any questions that come up!Because I thought that the ability (for non programmers) to create macros was a big selling point for NWP, but that set of expressions Hamid used certainly is beyond my (current) ken.
One resource to consult is the Macro Language Reference, available in NWP's Help menu. As has been pointed out before, it's not that helpful for beginners, but it may be invaluable as a reference.
That's very odd, but is it NWP itself saying that, or the Finder? Perhaps you could send me a sample file?I get a dialogue box that says Nisus doesn't recognize the application that created it
Oh, one tip: if you hold down the Command key when you choose a macro from the menu, it will be opened for editing.
Re: help constructing (any) NWP macro
Thank you, Martin. I will try the Macroizing button. Cheers, Candace