/* ** $VER: Expand.ped for PolyEd ** */ OPTIONS RESULTS OPTIONS FAILAT 11 /* ignore warnings */ SIGNAL ON SYNTAX /* ensure clean exit */ SIGNAL ON FAILURE SIGNAL ON BREAK_C /* no label->syntax->exit */ if (LEFT(ADDRESS(), 6) ~= "POLYED") then do if SHOW("Ports", "POLYED.1") then address 'POLYED.1' else do say "PolyEd is not running!" exit end end if ~SHOW("Ports", "REXPAND") then do say "RExpand is not running!" exit end 'LOCKGUI' /*----- begin of custom code area --------------------------------------*/ /*'position sow' */ 'getword var' wd address REXPAND 'expand' wd 'var rp requester' if rc = 0 then do 'position sow' 'block start' 'position eow' 'erase' 'text text' rp end /*----- end of custom code area ----------------------------------------*/ 'UNLOCKGUI' EXIT SYNTAX: /* ARexx error... */ say "Error line" SIGL ":" ERRORTEXT(RC) /* report it... */ 'UNLOCKGUI' /* Unlock GUI! */ EXIT /* exit */ FAILURE: 'UNLOCKGUI' /* Unlock GUI! */ EXIT /* exit */