Hi all
Is it at all possible to convert the
macro's that i have built up in Nisus Writer 5.1 and use them in
Nisus Writer Express
for example
Replace All "COLLEGE" "Coll" "oO-SAi-wt-G-g"
Replace All "PRIMARY SCHOOL" "Prim Sch" "oO-SAi-wt-G-g"
Replace All "Higher Education Centre" "H Ed Ctr" "oO-SAi-wt-G-g"
Any help would be appreciated
Thanks
Derek
macros
-
- Posts: 78
- Joined: 2004-04-13 04:44:40
- Location: Chatham, UK
- Contact:
If I understand you, you're typing "H Ed Ctr" as a shortform of Higher Education Centre, and then using the macro to find and replace?
If that is so, you might try adding your "shortcuts" to the Instant Fix list under Preferences. So, if you added "HEdCtr" or similar, NWE would automatically expand it as you typed.
Of course, I may well be barking up completely the wrong tree.
I appreciate your help butmaybe i need to clarify things a little. I hav a macro setup in nisus 5.1 that looks though a text file and replaces SCHOOL with SCH but only if the word SCHOOL is art the end of a feature.
For example:-
MANOR PARK SCHOOL would become MANOR PARK SCH but
MANOR SCHOOL ROAD would be left as MANOR SCHOOL ROAD.
Is there a way to do the same functionality in Nisus Writer Express and have the macro being called into play by an applescript
For example:-
MANOR PARK SCHOOL would become MANOR PARK SCH but
MANOR SCHOOL ROAD would be left as MANOR SCHOOL ROAD.
Is there a way to do the same functionality in Nisus Writer Express and have the macro being called into play by an applescript
I think that this could be done with Perl. But I couldn't tell you how to write the Perl macro. I'm less certain that AppleScript could do what you want, but I'm certainly no AppleScript expert. The downside to using Perl, as I understand it, is that at this point in time it will strip out formatting and styles. Is that a problem for you?
--Craig
--Craig
Here is a very simple macro you could use to change SCHOOL to SCH when it occurs just before a return (i.e., at the end of a paragraph) but not in the middle of a line. I used the text replacement template supplied by Nisus and changed only two lines. Modify the macro to your heart's content.
--Craig
Code: Select all
#Nisus Macro Block
#source clipboard
#destination clipboard
#Before Execution
#Select All
#Clipboard 1
#Copy
#After Execution
#Paste
#Clipboard 0
#End Nisus Macro Block
#This macro template lets you replace text with other text
#You can use regular expressions to do text pattern matching
while (my $line = <>) { #Reads each line of the selection from the clipboard
$line =~ s/SCHOOL\s*\n/SCH\n/ig;
# Replace the words with the expressions
# Repeat the whole line starting "$line =~ " above for multiple replacements
print $line; #writes out each line to the clipboard
}