Problem with Move Next Sentence

Get help using and writing Nisus Writer Pro macros.
Post Reply
cirillof
Posts: 12
Joined: 2011-05-01 23:38:35

Problem with Move Next Sentence

Post by cirillof » 2011-05-03 09:37:39

When I try to run this macro

Move Next Sentence:
Select Sentence
Select End

nothing happens and in the status bar I get a MoveNextSentence macro running message.

If I try to run that macro again I get a popup saying the macro is already running... (and as a matter of fact the application is less responsive to whatever kind of command)

Everything should be up to date. I just downloaded the latest version of nisus + related macros to be sure.

Some configuration data... I use

Nisus Writer Pro v 1.4.1 on a Mac OS X 10.6.7

I have the same problem with other Move/Select Next/Previous Word/Sentence macros.

BTW what is the best way to debug such problems with macros?

Thanks

Francesco

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

Re: Problem with Move Next Sentence

Post by martin » 2011-05-03 11:21:14

Hi Francesco- that is strange, as the sentence navigation macros are quite simple. Some questions:

1. Are you running NWP in the English localization?
2. What happens if you give the macro a very long to run? (something unreasonably long, like 4-5 minutes).
3. You might help us diagnose your problem if you take a "sample" of NWP using Apple's Activity Monitor application. Let me know if you need instructions for that.

Hopefully we can get this fixed for you.

cirillof
Posts: 12
Joined: 2011-05-01 23:38:35

Re: Problem with Move Next Sentence

Post by cirillof » 2011-05-04 03:03:49

Hi Martin,

1. Are you running NWP in the English localization?

Italian. I mean menu items are displayed in Italian. BTW Any way to get an English localization?

2. What happens if you give the macro a very long to run? (something unreasonably long, like 4-5 minutes).

Nothing. It keeps displaying the macro is running in the status bar.

3. You might help us diagnose your problem if you take a "sample" of NWP using Apple's Activity Monitor application. Let me know if you need instructions for that.

Activity Monitor it says: %CPU = 99.9 ; Thread = 8 ; Real Memory = 320,8 MB (growing) ; Virtual Memory = 309.MB (growing)

Thanks

Francesco
Attachments
nwp-sample.txt
(73.44 KiB) Downloaded 228 times

Groucho
Posts: 496
Joined: 2007-03-03 09:55:06
Location: Europe

Re: Problem with Move Next Sentence

Post by Groucho » 2011-05-04 09:17:15

Francesco said:
BTW Any way to get an English localization?
Hello, Francesco.
Unless you have a hacked copy, NWP is multilingual. Probably, if the interface is in Italian that is because your OS is Italian too. You can either change the OS’s language in System Preferences (I think it’s Preferenze di Sistema in your language), Language and Text tab (Lingua e Testo), or run an application that kills all international resources except US English, like iCleanLanguage. In this latter case, you had better make a backup copy of the application.

And, for Martin: How come I can never get the quote button to work properly? I mean the one to reply and quote. All I get is raw code.

Greetings, Henry.

Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: Problem with Move Next Sentence

Post by Kino » 2011-05-04 10:39:30

cirillof wrote:BTW Any way to get an English localization?
Try Language Switcher.
http://www.tj-hd.co.uk/en-gb/languageswitcher/.

Kino

--
Please have a look at:

- Help our kids!
http://mscr2011.jugem.jp/?eid=3
http://mscr2011.jugem.jp/?eid=4

The followings are helpful in understanding the situation:

- Fukushima parents dish the dirt in protest over radiation levels
http://www.guardian.co.uk/world/2011/ma ... ion-levels

- Ira Helfand's speech at Physicians for Social Responsibility Press Conference 4/26/11 (from 00:27:00):
http://www.youtube.com/watch?v=MkYCWTpUuLU

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

Re: Problem with Move Next Sentence

Post by martin » 2011-05-04 10:44:46

I investigated and this problem is caused by running NWP with a non-English GUI. The problem is the way the sentence macros were written. Internally they use menu commands to get the job done; that means they rely upon the title of the menus. Since your menu titles are in Italian, the English names don't match.

You might wonder why that causes the macro to do nothing and never finish running. The answer is the way the "Select Sentence" macro is written. It used to be that the macro would use a fancy find expression to match a sentence. But at some point we added this capability to NWP itself, and it runs better/faster than the macro would. So the code inside the macro became just "Select Sentence", in order to activate the menu Edit > Select > Select Sentence. That works fine in the English translation, but not for Italian because the menu Select > Select Sentence has a different name in Italian. Instead NWP activates the "Select Sentence" macro again, over and over and over.

The solution will be either to translate the macros to use the Italian menu names, or switch to running NWP in English.
cirillof wrote:Italian. I mean menu items are displayed in Italian. BTW Any way to get an English localization?
Yes indeed. It actually used to be quite easy- one could just Get Info on an application in the Finder and change the language from a popup button. But for some inexplicable reason, Apple removed that feature.

In addition to what Henry has mentioned, you might check out Language Switcher or LaunchCodes. I haven't tried them myself, but both address this problem.

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

Re: Problem with Move Next Sentence

Post by martin » 2011-05-04 10:46:36

Groucho wrote:And, for Martin: How come I can never get the quote button to work properly? I mean the one to reply and quote. All I get is raw code.
I'm not sure I understand- the "quote" forum BBCodes handle the quoting. So it's expected that you would see them.

Groucho
Posts: 496
Joined: 2007-03-03 09:55:06
Location: Europe

Re: Problem with Move Next Sentence

Post by Groucho » 2011-05-04 12:53:19

“martin” wrote:I'm not sure I understand- the "quote" forum BBCodes handle the quoting. So it's expected that you would see them.
This above is what I get when I click on “quote”.
I’m sure it worked time ago. Now no longer.
When I want to quote I work around it like this:
Martin said:
Hello world!
Greetings, Henry.

cirillof
Posts: 12
Joined: 2011-05-01 23:38:35

Re: Problem with Move Next Sentence

Post by cirillof » 2011-05-04 13:21:21

Thanks Martin, Kino, Groucho,

I downloaded Language Switcher, changed the language to English and the Move Next Sentence works.

Martin I really appreciated your explanation about the macro misbehavior.

Thanks again,

Francesco

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

Re: Problem with Move Next Sentence

Post by martin » 2011-05-04 15:51:24

Groucho wrote:This above is what I get when I click on “quote”.
I’m sure it worked time ago. Now no longer.
The first code you gave doesn't work because the user name after the "quote=" code is in curly quotes. I'm guessing the forum's BB code doesn't handle that.

As to why you get those curly quotes, I don't know. Perhaps you have some kind of system wide autocorrection, expander, etc tool running?

Groucho
Posts: 496
Joined: 2007-03-03 09:55:06
Location: Europe

Re: Problem with Move Next Sentence

Post by Groucho » 2011-05-04 22:02:45

Ah, OK, got it, thanks a bunch. It’s the OS’s substitution service. I always keep smart quotes on.

Henry.

Post Reply