Macro for fast spell correcting

Get help using and writing Nisus Writer Pro macros.
Post Reply
js
Posts: 259
Joined: 2007-04-12 14:59:36

Macro for fast spell correcting

Post by js »

There was a slight modification for Spellchecking in Nisus Pro 1.3

The Menu „Correct Next spelling“ now produces a mini window with alternative spellings. Manually pressing the down arrow key selects the first alternative spelly, mostly the one we need, which must then be confirmed with return. Can this be done with a macro?

I tried „down arrow“ with key code 125 of the system events. But in this context it does not execute.
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Macro for fast spell correcting

Post by martin »

I'm afraid not, the problem is that the little popup menu is "modal" and subsequent macro commands do not execute until it has been dismissed. This is made clear by trying the following macro:

Code: Select all

Correct Next Spelling
Select All
Bold
Well, if that weren't the case, you could do:

Code: Select all

Correct Next Spelling
Send Selector "moveDown:"
Send Selector "insertNewline:"
But you're out of luck here.
js
Posts: 259
Joined: 2007-04-12 14:59:36

Re: Macro for fast spell correcting

Post by js »

Reading your "out of luck" I could maybe restate what I think would be a great feature: To do in spell checking what Google does with it's "I feel lucky" mode: Make waht is most probable a first choice. If you have _not_ been lucky just go back and try in normal mode. That would mean saving lots of time for many users.

Practically this feature could work like this:

1 Apply "Find next mistake", and show the most probable solution on top of the list in the modal window.
2 Reapply "Find next mistake" to confirm and jump to the next mistake

If that first choice was not the good one just do what you do now: arrow down and confirm, or return and get out leaving the original spelling.
In fact for an incredibly efficient spell correct all you would have to do is adding step 2, leaving the rest as it is ...

Well, take this as a suggestion please.
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Macro for fast spell correcting

Post by martin »

I'm not sure I'm entirely clear on what you envision, but I suspect that if the macro language allowed retrieving a list of spelling suggestions for a word (eg: as an array), that would allow you to put your feature together however you please. If that wouldn't cover what you want, please let me know, thanks.
js
Posts: 259
Joined: 2007-04-12 14:59:36

Re: Macro for fast spell correcting

Post by js »

No this was not my point. Let's take these few word from your answer: "put your feature together however you please"
Imagine that (forgive my example) you wrote: put your faeture together hownever you please.

Reading this and wanting to correct it I know at one glance that the corrector will propose me the words "feature" and "however", as a first choice, on top of the list. I think that by far most typing errors are of this kind. Now if you would program Nisus as I suggested, and lets say I put a shortcut cd-y for "correct next spelling", then I could simply set the cursor someplace before the first error, close my eyes and dream of my sweetheart and press cd - y - y. Now compare what you have to do actually to deal with this most common off all correcting scenarios. I find it such a nuisance to tell my software the same thing, all the time.

On the other hand, if this is NOT your scenario you dont' lose anything. All you have to do is what you do now: press cd - y only once, go down the list and chose, and only then press it again, to say thats the one. (Instead of double clicking). Programming it this way you don't lose anything, but you can gain a lot. (And it's a free suggestion).

PS In the same context I wonder when Apple (or Nisus?) will realize what anybody who works with more than one script on the same text (like English with Japanese interspersed) would urgently need for fast input: that the shape cursor changes when the script changes: to be aware at all times in what script he is in, without having to glance at some far away icon.

Well, for what it is worth.
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Macro for fast spell correcting

Post by martin »

Thanks for explaining, I understand now. Probably the best way to do this is to have the popup always display itself with the first entry pre-selected. Then if the command is invoked again (eg: as you say with Command + "Y") the change is committed and you move on to the next misspelling.
js
Posts: 259
Joined: 2007-04-12 14:59:36

Re: Macro for fast spell correcting

Post by js »

Probably the best way to do this is to have the popup always display itself with the first entry pre-selected.
Yes that is what should be implemented.
Then if the command is invoked again (eg: as you say with Command + "Y") the change is committed and you move on to the next misspelling.
Yes, this is the other thing that should be implemented. Reading your line I wonder if you realize, that this not what Nisus actually does. If after selecting you invoke the correcting command, instead of committing what you chose, Nisus is cancelling what you chose. This is not only complicating things, it seems perfectly useless. Or tell me: what could one possibly gain with such a procedure?

Tu sum it up: Making a truly useful instrument of the Nisus spell corrector all we would need is this:

1) display with the top choice already selected
2) Have the reinvoked command commit our choice and immediately jump to the next misspelling
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Macro for fast spell correcting

Post by martin »

js wrote:Reading your line I wonder if you realize, that this not what Nisus actually does. If after selecting you invoke the correcting command, instead of committing what you chose, Nisus is cancelling what you chose. This is not only complicating things, it seems perfectly useless. Or tell me: what could one possibly gain with such a procedure?
I am aware of the current behavior, though offhand I don't know the motivation behind it, sorry.
Post Reply