/* Use scmsg to process Iconx errors */ /* Use the arg string as a stem for the Clip names. */ PARSE ARG 1 clipstem SIGNAL ON BREAK_C IF SHOW('Ports', 'SC_SCMSG') == 0 THEN ADDRESS command 'run sc:c/scmsg' i=0 DO WHILE SHOW('Ports', 'SC_SCMSG') == 0 ADDRESS command 'Wait 1 sec' i = 1+1 IF i > 4 THEN DO SAY 'Could not find scmsg' EXIT END END list = SHOW('Clips') DO WHILE list ~= '' PARSE VAR list clipname list IF (POS(clipstem, clipname) == 1) THEN DO errorclip = GETCLIP(clipname) IF errorclip = '' THEN LEAVE ELSE result = SETCLIP(clipname, '') PARSE VAR errorclip 'File:' filename 'Line:' linenumber 'Number:' errornumber 'Text:' errortext filename = STRIP(filename) msg = 'newmsg "Iconx" "'||filename||'"'||linenumber||' "" 0 Error '||errornumber||errortext ADDRESS 'SC_SCMSG' msg END END BREAK_C: EXIT