Reply to topic  [ 15 posts ] 
text editing macros 
Author Message

Joined: 2007-07-17 08:10:02
Posts: 11
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


2007-07-17 08:14:00
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
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


2007-07-17 13:07:58
Profile WWW

Joined: 2007-07-17 08:10:02
Posts: 11
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


2007-07-17 14:26:02
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
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.


2007-07-17 15:29:33
Profile WWW

Joined: 2007-07-17 08:10:02
Posts: 11
But there is no way to make one's own within Nisus, correct?


2007-07-17 19:36:08
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
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.


2007-07-17 23:32:24
Profile WWW

Joined: 2007-07-17 08:10:02
Posts: 11
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.


2007-07-18 09:00:35
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
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.


2007-07-18 16:12:13
Profile WWW

Joined: 2007-04-12 14:59:36
Posts: 229
Post 
[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?


2007-07-20 01:58:33
Profile

Joined: 2007-07-17 08:10:02
Posts: 11
Thanks so much, Martin, for the macros. They are very useful.


2007-07-20 08:22:49
Profile

Joined: 2007-07-17 08:10:02
Posts: 11
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


2007-07-25 09:02:00
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
Here you are Thomas, I hope these macros do the job for you!


2007-07-25 12:31:17
Profile WWW
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
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?


2007-07-25 12:46:14
Profile WWW

Joined: 2007-04-12 14:59:36
Posts: 229
Post 
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


2007-07-27 08:48:41
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Post 
No problem js, I'm glad you find it useful!


2007-07-27 11:51:33
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 15 posts ] 

Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software