410 page doc gone!!! + a Macro question....can anyone help?

Have a problem? A question? This is the place for answers from other Express users.
peridot
Posts: 47
Joined: 2005-12-22 05:02:16

410 page doc gone!!! + a Macro question....can anyone help?

Post by peridot »

I tried (and failed) to write a simple macro. When I went back to my doc, worked on it for a while, then tried to save it, I got a message saying that it could not be saved in this script (or something close to that). I'd never seen that message, didn't understand it & proceeded to save. When I reopened the doc, all the text was gone. All 410 pages! At the bottom of the blank doc, the status line read page 1 of 1.

I'm dying here. Can anyone tell me what happened? And how to fix it? I eventually retrieved the doc via Spotlight (or whatever it's called) but my work of the afternoon was gone...is there any way to find it????

BTW: And am I the only one who can't figure out the macro directions in the "help" guide? I wanted to create a quick way to expand words/names...for example, when I type nyc to have it automatically expand to New York City...I tried doing this in Quick Fix but that didn't work either...
midwinter
Posts: 333
Joined: 2004-09-09 18:07:11
Location: Utah
Contact:

Post by midwinter »

I can't speak to the macros, which baffle me in almost any application. But for the NYC, why not just make sure you type the city names in all caps, then to a find and replace at the end with it set to match case?
dshan
Posts: 334
Joined: 2003-11-21 19:25:28
Location: Sydney, Australia

Post by dshan »

You were trying to create a Perl macro? Using NWX to edit it? It sounds like after you had edited your macro you were trying to save your big document in the wrong location (maybe in the macros folder?) Is it still there perhaps?

I would have thought Spotlight would find it, though as I recall there's a bunch of places Spotlight doesn't look, probably the /Library and ~/Library folders are among them. Oh how I wish Apple would allow you to add folders to Spotlight's search list rather than just remove them!

Lesson: Don't ignore messages when you save things, it's trying to tell you something! I suspect in this case it was trying to tell you the path/location you were saving your big document to was not the one you thought it was...
peridot
Posts: 47
Joined: 2005-12-22 05:02:16

Post by peridot »

Thanks for the input. It's not in the macro file...You're of course right about messages. I've been using computers since practically paleolithic times but Nisus macros defeat me...I wish the NWE help were more helpful, ie more detailled & explicit...It seems so simple to set up the kind of expansion I have in mind but apparently not....
dshan
Posts: 334
Joined: 2003-11-21 19:25:28
Location: Sydney, Australia

Post by dshan »

You said you tried using quickfix to expand such strings but it didn't work, but didn't explain what the probem was. I tried it and it happily expands nyc to New York City. Quickfix sounds like the best approach for what you want as any macro will have to be explicitly run on the doc afterwards, whereas quickfix is interactive.

As to NWX macros, the reason the docs don't go into more detail is that two of the three types of macros are not Nisus features per se, they're built upon, and assume you are familiar with, Applescript and/or Perl scripting, both of which are extensively documented elsewhere (links to useful sites are listed in the NWX User's Guide). NWX just provides the interface to them.
peridot
Posts: 47
Joined: 2005-12-22 05:02:16

thanks...

Post by peridot »

the problem I ran into with Quickfix is that my addition (I could only make one at a time or else my previous entry would immediately disappear) vanished as soon as I left the screen. How do I get my entries to "stick"? Is there a save button I'm missing?
dshan
Posts: 334
Joined: 2003-11-21 19:25:28
Location: Sydney, Australia

Post by dshan »

No, there is no save button. They should stick automatically just like other preferences. Mine do. Is the language selector at the top of the Quickfix pane set to the correct language?

I don't know where the quickfix info is stored (it doesn't seem to keep them in the com.nisus.NisusWriter.plist file) but it appears your's is not working properly for some reason. Do changes you make to other preferences (e.g. in General or New Document) stick?
peridot
Posts: 47
Joined: 2005-12-22 05:02:16

Post by peridot »

Hi...The correct language is selected & the other changes to preferences have worked fine (I have made very few). I've emailed nisus support & hope they'll have the solution. If you have any other ideas, PLMK. I appreciate your help.
dshan
Posts: 334
Joined: 2003-11-21 19:25:28
Location: Sydney, Australia

Post by dshan »

Okay I found where it keeps the quickfix stuff - it's in ~/Library/Application Support/Nisus Writer/Languages/<lang-name>.nlang and it consists of a bunch of XML preferences incl the list of typo corrections. I'm using English - Australia.nlang. I assume you're using US English and that has a similar .nlang file.

Presumably when you make changes to the quickfix settings the .nlang file is not getting updated for some reason. Permissions problem perhaps? Maybe it's become corrupted somehow. Try renaming your .nlang file to ".nlang (old)" or something (quit NWX first). Then open NWX again and go to Preferences->Quickfix and make some addition to the list, it should create a new .nlang file with the changes in the Languages folder.
cchapin
Posts: 424
Joined: 2004-02-25 18:28:40
Location: Nagoya, Japan

Post by cchapin »

It might be that you need to move out of the "correction" you've created (by pressing tab or return or, better yet, clicking another item in the list) before closing the Preferences dialog. If I create a QuickFix entry, it won't take effect until I do this.

--Craig

Edit: Regarding macros, the <text_replace_template item in the Macro menu is not working for me, but if you open that file from the Finder, you can pretty easily modify it and save it under a new name. Just be aware that it works on selected text unless you specify otherwise.
cgc
Posts: 80
Joined: 2004-09-19 13:30:46
Location: California
Contact:

Re: 410 page doc gone!!! + a Macro question....can anyone h

Post by cgc »

peridot wrote:I tried (and failed) to write a simple macro. ... When I reopened the doc, all the text was gone. All 410 pages! ... I eventually retrieved the doc via Spotlight (or whatever it's called) but my work of the afternoon was gone.
You are lucky to have recovered most of that enormous document. I may write ~30 pages for a research paper for college but cannot afford to lose it. I recommend you do what I and many others do and back up everything that's important to you. That's an awful lot of work to lose.
peridot
Posts: 47
Joined: 2005-12-22 05:02:16

Post by peridot »

Hi Craig...thanks for the ideas. Unfortunately, none of the them worked. Each simply caused my entry to disappear!!! bleh...

Hi GC! I know I'm lucky! I'm such a fanatic about backing up that I had backed up what I thought was my doc BEFORE I knew that it had been evaporated by whatever gremlins were guilty. The ONE time ever that backing up has backfired so I ended up with 3 blank docs instead of just one!!!!

Hi Shan: Thanks for your time & effort on this. What's the best way to access this file? Do I put it into the Spotlight search box? Thanks again....
cchapin
Posts: 424
Joined: 2004-02-25 18:28:40
Location: Nagoya, Japan

Post by cchapin »

peridot wrote:Hi Craig...thanks for the ideas. Unfortunately, none of the them worked. Each simply caused my entry to disappear!!! bleh...
Did the entry disappear or did it simply get sorted alphabetically under Typo? That's how it works for me. Scroll down and see if you see it.

--Craig
peridot
Posts: 47
Joined: 2005-12-22 05:02:16

Post by peridot »

Hi Craig...Indeed my additions do appear alphabetically when I scroll down. The problem is that when I type "ny" nothing happens. ie: ny does not autocomplete to New York City...

I've tried using"ny" followed by a space AND "ny" not followed by a space...makes no difference.

BTW, the quick fixes supplied with Nisus work fine...
cchapin
Posts: 424
Joined: 2004-02-25 18:28:40
Location: Nagoya, Japan

Post by cchapin »

Puzzling. Not knowing quite how to interpret what you wrote, I created two entries in QuickFix: "ny" and "ny " (with a trailing space), both of which expand to "New York City." Both work, though I have to type two spaces after "ny " to get it to expand, which is as it should be.

One thing to be aware of if you are experimenting repeatedly with the same bit of of text: Once a typo in a document has been AutoFix-corrected and then undone, it doesn't like to be re-corrected. Again, this is as it should be -- for those cases when you don't want "ny" to expand to "New York City."

--Craig
Post Reply