text editing macros

Get help using and writing Nisus Writer Pro macros.
Post Reply
Thomas C. Wolfe
Posts: 11
Joined: 2007-07-17 08:10:02

text editing macros

Post by Thomas C. Wolfe » 2007-07-17 08:14:00

I am a new user and am wondering two things:
can one write text editing macros in Nisus Pro and can one start macros with keyboard commands?

you can do this in my previous word processor, M....... W..., and I appreciate the speed with which one can delete sentences, words, etc. with a keystroke combination.

Thanks,
Tom

User avatar
martin
Official Nisus Person
Posts: 4288
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin » 2007-07-17 13:07:58

Hi Tom,

You certainly can write text editing macros in NWP. If you have any specific macro in mind, please let me know.

As for keyboard commands, I'm not sure I understand exactly what you're after. You can trigger the menus associated with keyboard commands in macros, eg: your macro would contain the command "New" instead of something that specified Command + N. I hope that makes sense- let me know if you're thinking about something else.

~Martin

Thomas C. Wolfe
Posts: 11
Joined: 2007-07-17 08:10:02

Clarification

Post by Thomas C. Wolfe » 2007-07-17 14:26:02

Thanks for the reply, Martin, I can be more specific.

I was thinking of two things.

First, cursor movement. I am addicted to the old old wordstar cursor movement commands: ctrl-A is word left; ctrl-S is character left; ctrl-D is character right; and ctrl-F is word right. This sort of thing.

And secondly, edits such as: ctrl-J deletes the rest of the sentence to the right of the cursor. And ctrl-W deletes the word the cursor is in.

In Microsoft word I can either program them in the Keyboard customization area, or I can record small macros to do this work.

I know that there are ways to move the cursor around in OSX, it is just that I am much more comfortable with these old ways.

Is there anyway to do this sort of thing in NWP?

Thanks,
Tom

User avatar
martin
Official Nisus Person
Posts: 4288
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin » 2007-07-17 15:29:33

Ah, I think I see what you are looking for now Tom. OSX has most of these things built-in. For example, Option + Right Arrow moves you to the next word, Option + Delete deletes the preceding word, etc. Here is a list that someone has compiled.

Thomas C. Wolfe
Posts: 11
Joined: 2007-07-17 08:10:02

ah ha.

Post by Thomas C. Wolfe » 2007-07-17 19:36:08

But there is no way to make one's own within Nisus, correct?

User avatar
martin
Official Nisus Person
Posts: 4288
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin » 2007-07-17 23:32:24

You can certainly create a macro that manipulates the selection or deletes bits of text. Those macros could then be assigned keyboard shortcuts in NWP preferences.

Thomas C. Wolfe
Posts: 11
Joined: 2007-07-17 08:10:02

sample macro

Post by Thomas C. Wolfe » 2007-07-18 09:00:35

Martin, please tell me if this request is asking for help that you are too busy to provide. You must receive many questions. But if you could give me an example of say, the text of a macro that would highlight a sentence and then delete it, I could probably write the other ones on my own. I understand that macros are essentially lists of commands taken from the menu bar, but I don't see those commands for such basic things as cursor movement and turning selection on and off on the menu bar. Again, I can make do with the old Cocoa commands (thanks for the list), but if possible I would like to get back to my old keyboard commands.

(Or is there any chance that an upcoming version of NWP would have the ability to record macros?)

Thanks for your help.

User avatar
martin
Official Nisus Person
Posts: 4288
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin » 2007-07-18 16:12:13

Hi Thomas, it's no problem. I've created the macros you asked for and placed them in our macro repository.

As for recording macros, I'm not sure if we'll see this any time soon, sorry.

js
Posts: 229
Joined: 2007-04-12 14:59:36

Post by js » 2007-07-20 01:58:33

[quote="martin"]Hi Thomas, it's no problem. I've created the macros you asked for and placed them in our macro repository.

Your sentence selecting macro won't do with a sentence like: "Drinking milk (cf. A. Porter: The softdrink in the Americas) is healthy." Could it be done at all?

Thomas C. Wolfe
Posts: 11
Joined: 2007-07-17 08:10:02

thanks

Post by Thomas C. Wolfe » 2007-07-20 08:22:49

Thanks so much, Martin, for the macros. They are very useful.

Thomas C. Wolfe
Posts: 11
Joined: 2007-07-17 08:10:02

Pushing the support limit

Post by Thomas C. Wolfe » 2007-07-25 09:02:00

Dear Martin,
I know I am pushing the customer support limit, but I cannot figure out how to write four (probably simple) macros. If you have a moment, I would be very grateful if you could do this.
1. to move the cursor to the next word
2. to move the cursor to the previous word
3. to delete the word the cursor is in
4. to delete the previous word

I know these are all possible to do with the default key bindings, but the key thing is to be able to map them onto combinations using regular letters of the keyboard. I like the program very much but I am so used to the old ways!

Thanks
Wordstar Wolfe

User avatar
martin
Official Nisus Person
Posts: 4288
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin » 2007-07-25 12:31:17

Here you are Thomas, I hope these macros do the job for you!

User avatar
martin
Official Nisus Person
Posts: 4288
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin » 2007-07-25 12:46:14

js wrote:Your sentence selecting macro won't do with a sentence like: "Drinking milk (cf. A. Porter: The softdrink in the Americas) is healthy." Could it be done at all?
I suppose it is possible, it's just a matter of figuring out all unambiguous cases where a period does not indicate the end of a sentence. Some rules that your example sentence illustrates:

1. The period does not follow a single letter.
2. The period does follow a common abbreviation. We'd need to think of a list of these. Using google I've found this list, which seems pretty good.

The problem with rule number two is that an abbreviation may terminate a sentence, eg: "I live on Sapphire Blvd." In this case the macro is out of luck. Would you be be interested in an updated macro that incorporates these rules?

js
Posts: 229
Joined: 2007-04-12 14:59:36

Post by js » 2007-07-27 08:48:41

martin wrote:
js wrote:Your sentence selecting macro won't do with a sentence like: "Drinking milk (cf. A. Porter: The softdrink in the Americas) is healthy." Could it be done at all?
I suppose it is possible, it's just a matter of figuring out all unambiguous cases where a period does not indicate the end of a sentence. Some rules that your example sentence illustrates:

1. The period does not follow a single letter.
2. The period does follow a common abbreviation. We'd need to think of a list of these. Using google I've found this list, which seems pretty good.

The problem with rule number two is that an abbreviation may terminate a sentence, eg: "I live on Sapphire Blvd." In this case the macro is out of luck. Would you be be interested in an updated macro that incorporates these rules?
Martin, thanks for asking. I don't think that I would use such a macro often, all the more that it should work also for other languages than enlish. Basically I was interested in how it can be done, to get a better grip on macro writing by learning from you. It's good to have this kind of help.

Best

js

User avatar
martin
Official Nisus Person
Posts: 4288
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin » 2007-07-27 11:51:33

No problem js, I'm glad you find it useful!

Post Reply