/* Create Amiga Guide Nodes v1.01, for Wordworth v4SE by Ryan Morse.
$VER: AmigaGuide_Create_Nodes_Command 1.0 (10/12/95)

This script will create nodes for Amiga Guide documents. Write your document (see the conditions of usage below), and run this script to create the nodes.

USAGE:  For this script to work properly, begin each topic with the word STARTTOPIC, and then write the topic title. Keep these together on a line by themselves. Finish each topic by the word ENDTOPIC, which should also be on a line by itself.

This script works by finding the STARTTOPIC text, and replacing it with the node command. The script then finds the ENDTOPIC text, and replaces it with the end node command. */

/* Notify user */
REQUESTRESPONSE 'This script will change all topics into nodes.'
/* If user cancels requester then stop script */
IF RC>0 THEN DO
	REQUESTNOTIFY 'AREXX MACRO CANCELLED.'
	EXIT
	END

/* Find Start of Topic */
POSITION SOF
FINDCHANGE ALL FIND 'STARTTOPIC' CHANGE '@NODE'
/* Find End of Topic */
POSITION SOF
FINDCHANGE ALL FIND 'ENDTOPIC' CHANGE '@ENDNODE'

/* Notify user */
REQUESTNOTIFY 'All topics have now been changed to nodes.'
