home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
text
/
heddley
/
archive
/
savenode.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-02-27
|
2KB
|
39 lines
/* savenode.rexx */
/* by Edd Dumbill */
/* 2 July 1994 */
/* returns a document from GoldED to Heddley */
/* use this macro as a basis for interfacing with other aynschronous */
/* text editors. */
OPTIONS RESULTS /* enable return codes */
if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
address 'GOLDED.1'
'LOCK CURRENT' /* lock GUI, gain access */
OPTIONS FAILAT 6 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean exit */
SIGNAL ON FAILURE /* trap Heddley errors */
SAVE NAME 'T:temp_node' /* save document text back */
address 'HEDDLEY.1' /* talk to Heddley */
EDIT LOADTEXT 'T:temp_node' /* reload document text */
LOCK UNLOCK /* unlock front panel */
address 'GOLDED.1' /* talk to GoldED */
'UNLOCK' /* VERY important: unlock GUI */
EXIT /* quit this macro */
SYNTAX: /* ARexx error... */
SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) /* report it... */
UNLOCK /* unlock GUI */
EXIT /* exit */
FAILURE: /* Heddley error... */
ERRV=address().LASTERROR /* get name of error var. */
SAY "Error:" VALUE(ERRV) /* report the error */
ADDRESS GOLDED.1 /* talk to GoldED */
UNLOCK /* unlock GUI */
EXIT /* exit */