Macro for Nisus Writer Pro

I am a new user so I need some help.

I use Nisus Writer Pro. I would like to design a couple of macros that would insert some carriage returns and a === or •••••• between those returns. The = and * would then be centered using a predefined short cut key of F-2 on my Mac keyboard. How can I do that so it is application specific. Any help will be greatly appreciated!

The macro below inserts 2 returns, then inserts the text ====, presses F2 to center, and last inserts 2 returns.
This should give you an idea of how to achieve it.

Hey Doug,

While you can do this sort of thing with Keyboard Maestro, Nisus Writer Pro has its own very powerful macro language.

I’m a little peeved that the AppleScript support isn’t a little better, but it didn’t take me long to figure this out after looking at a couple of sample macros.

# NisusMacroProperty Name: • Default Macro
$doc = Document.active
If ! $doc
	Exit
End

Menu 'Paragraph:Align Left'

Type Text "I'm a Nisus Writer Pro Document!"
Type Text "\n\n"

Menu 'Paragraph:Align Center'

Type Text "===="
Type Text "\n"
Type Text "••••"
Type Text "\n\n"

Menu 'Paragraph:Align Left'

Type Text "Automate Me!"

Nisus even supports Perl, so it should be possible to do some very sophisticated stuff.

I took the time to download all of the extra macros. If you want them let me know listmeister@thestoneforge.com.

The user manual appears to be reasonably comprehensive, and there’s a pretty good support community.

-Chris

Thank you both for all your help. I have been swamped and have not been able to follow up. I am a pastor and we have had a run of serious illnesses and a death so I am slightly behind LOL

I appreciate your time and effort and will try to put this into play.

Doug