I have a problem with an ARexx script that is started from inside GoldEd. Its purpose is to start BlitzBasic and display a success (or failure, or 'is already ruinning') message in GoldEds status bar. Here's the whole script, and it contains some GoldEd boilerplate code at the start and at the end. My script content starts after the INSERT YOUR CODE HERE comment:
Code:
/* Open BlitzBasic/TED from GoldED */
options results /* enable return codes */
if (left(address(), 6) ~= "GOLDED") then /* not started by editor ? */
address 'GOLDED.1'
'LOCK CURRENT RELEASE=4' /* lock GUI, gain access */
if (RC ~= 0) then
exit
options failat 6 /* ignore warnings */
signal on syntax /* ensure clean exit */
/* ------------------------ INSERT YOUR CODE HERE: ------------------- */
cmd_start_ted = 'run >NIL: <NIL: SYS:DevTools/BlitzBasic2/Blitz2'
status_msg = 'TED already running.'
ted_port = 'TED_REXX1'
resources_loaded = 1
/* Open rexxsupport.library, needed for msg related functions */
if ~Show('LIBRARIES', 'rexxsupport.library') then do
if ~AddLib('rexxsupport.library', 0, -30) then do
status_msg = 'Failed to open rexxsupport.library.'
resources_loaded = 0
end
end
if resources_loaded = 1 then do
if ~Show('PORTS', ted_port) then do
address command cmd_start_ted
loaded=0
do for 25 while loaded=0
Delay(15)
if Show('PORTS', ted_port) then do
loaded=1
status_msg = 'Sucessfully loaded TED.'
end
end
if loaded=0 then do
status_msg = 'Failed to load TED.'
end
end
end
'REQUEST STATUS="'status_msg'"'
/* ---------------------------- END OF YOUR CODE ----------------------- */
'UNLOCK' /* unlock user interface */
exit
SYNTAX:
SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
'UNLOCK'
exit
It works so far, it opens Blitz, but afterwards there is an error requester opened in GoldEd with the message: "Unknown command or script".
The error request doesn't appear if I comment out the line with the Delay(15).
This tells me that GoldEd wants to process the Delay(15). But this function, Delay(), isn't for GoldEd - it's a function of the rexxsupport.library that is opened a few lines above the Delay() call.
How can I manage that GoldEd doesn't want to process the Delay() but rexxsupport.library does instead?