macro woes

Have a problem? A question? This is the place for answers from other Express users.
Post Reply
woodson
Posts: 6
Joined: 2005-10-06 14:32:24
Location: Asia

macro woes

Post by woodson »

In trying to understand the supplied macros NEX I found out that if I use one, then another, then maybe another of the supplied macros on a small document (under 1000 words in this case), one of two things will happen:

(1) the macro will engage (as indicated by the colored "macro" menu title and will lock up the app - command-period has no effect; or

(2) the macro will not start. Closing and reopening the doc has no effect. If I close and relaunch the app the same macro on the same doc works fine. But do two or three in a row (as in testing changes in a modified macro, for example, which is a very common way to learn and do new things) and the same problem happens again. That's how I first discovered the problem. Then to document it I only used unmodified versions of the supplied macros and got the same results.

I used MacPerl in Classic a lot and you could always bail out with Command-period. I hope to use more complicated macros on chapter- and book files in NEX so what I found is a stopper.

Help or suggestions?

Thanks, Woodson

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

Post by martin »

(1) There is a bug in our macros that can hang Express if the text the macro is working on is over a certain number of characters. This will definitely be fixed when we release our next free maintenance upgrade.

(2) What does your macro do? Is it all Perl, or does it use the menu system in Express? How are you getting input to the macro (eg: are you doing a Select-All before running the macro)?

woodson
Posts: 6
Joined: 2005-10-06 14:32:24
Location: Asia

macro woes

Post by woodson »

Thanks for the info. I want to use your PERL macro capability a lot, and in lots of different ways.

When I was testing, I was using your own macros provided with NEX. The wordlist macro, which was the first one I studied, has a mix of nisus and PERL commands. I selected all the text in the frontmost window before starting it.

I wanted to modify it to paste the results into another window or document. This meant changing the Nisus part with which I have no recent experience. Hence the numerous repeats on a small file to test my changes. This led me more general testing (using only unmodified macros) because things acted funny as I was trying my small incremental changes. The problems I had didn't seem to be connected to the changes I made.

The file I was using is small (under 1 KB) as my files go. This indicates the the character limit is quite low. Or I might be encountering another problem at the same time, I don't know.

A book file can run a MB or more (as a plain text file). I hope the new number of characters limit is good and high so as not to restrict ambitious work.

Ideally it would work like PERL itself (at least MacPerl which is where my experience comes from). My standard dictionary (word list) file is about 800 KB. I'd load it into a hash and then run a word list of my file against it (loaded into another hash). This easily gave me a list of the words in my file that were not in the dictionary file. And yes, batch work like this is much better than an interactive spell checker for many purposes.

When I worked with a 45 MB text file once, all I needed to do was increase the memory allotted. Should be automatic in OS X, and I have 1 GB of RAM for it to work with and hard drive space for virtual memory. So I look for a pretty high char limit, if there is a reasonable limit at all. I just want to write books and keep track of a few things while I'm doing it.

Thanks, Woodson

David Waterhouse
Posts: 17
Joined: 2004-10-11 12:11:12

Post by David Waterhouse »

I think I have encountered the same problem when trying to alphabetise lists. In the old Nisus Writer "sort paragraphs" was under "Edit", and it worked like a charm. Now for some reason it is under "Macro", and it does not work well at all.

In particular, as Express Help explains, without the hint of an apology, "Nisus Writer Express removes all formatting when it sorts your text". I find this intensely annoying, as I have many bibliography lists in Nisus Writer which use italics. If I transfer them to Nisus Writer Express they look pretty until I sort them in alphabetic order, when all the italics disappear. Please fix this!

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

Re: macro woes

Post by martin »

woodson wrote:When I worked with a 45 MB text file once, all I needed to do was increase the memory allotted. Should be automatic in OS X, and I have 1 GB of RAM for it to work with and hard drive space for virtual memory. So I look for a pretty high char limit, if there is a reasonable limit at all.
I completely understand and indeed you are correct that memory management is automatic in OSX. It is a bug in Express that there is a limit at all and when the next version is released the limit will be removed. If you would like to help test macros when a beta version is available, send an email to me via expressfeedback@nisus.com, thanks.

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

Post by martin »

David Waterhouse wrote:In particular, as Express Help explains, without the hint of an apology, "Nisus Writer Express removes all formatting when it sorts your text". I find this intensely annoying, as I have many bibliography lists in Nisus Writer which use italics.
This is not the same bug Woodson was running into, but rather is a limitation of the current "Sort" macro. We know people find it obnoxious and we are looking to adding a proper sorting command that removes this limitation.

David Waterhouse
Posts: 17
Joined: 2004-10-11 12:11:12

Post by David Waterhouse »

Thank you, Martin, for your encouraging reply. I look forward eagerly to this improvement.

I am aware that the italic problem in "Sort Paragraphs" is not what Woodson was reporting; but I think I did also encounter his difficulty when hitting "Command A" prior to clicking on "Sort Paragraphs". Though my list was not so long, everything went crazy: either the programme got stuck, or the list became a long column of single letters.

Post Reply