was: can't launch demo -> now PERL

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

was: can't launch demo -> now PERL

Post by woodson »

Quick 6,000 mile phone call squashed problem - I had added my favorite old font to my new OS. Removed and problem seems fixed.

To PERL. Reading the old topics didn't turn up much about using PERL to do scripting for macros. As an occasional programmer trained on mainframes, I've used PERL as MacPerl (on Classic) for years to help me with my writing. Now I'll try to use it to help me similarly from Express.

I got interested in using Express because of a writing project in the first place. It seemed an added bonus to discover that in the meantime Nisus had integrated PERL into the macro system. I have to start building files to take care of contractions and the proper nouns I use in the books.

Anyone else wrestling with similar stuff?


Posts: 334
Joined: 2003-11-21 19:25:28
Location: Sydney, Australia

Post by dshan »

I went through the Perl thing recently with NWX and I found it fairly straighforword. I read the User Guide ("Writing Perl Scripts" on page 193 onwards in particular but the whole macro section is valuable), played with some of the supplied scripts and had a look at their code. If you already know Perl it should be even easier (I had only a slight knowledge of it when I started).

The key thing is the fact that most NWX Perl macros operate on a section of previously selected text which the NWX/Perl i/f copies to the clipboard (i.e. use the "#Before execution" "Copy" and "#source" "clipboard" directives) and feeds it to the macro via stdin. Output is normally written to stdout (which is usually directed to the clipboard via the "#destination" "clipboard" directive) and then pasted back into the document via the "#After execution" "Paste" directive when the macro completes.

Post Reply