home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / proasm / rexx / ttx / nexterror.ttx < prev    next >
Text File  |  1996-04-29  |  1KB  |  48 lines

  1. /******************************************************************************
  2.  
  3.  ASX NextError Script for TurboText
  4.  
  5.   © 1993 by Michael "TILT!" Ryffel
  6.   [some parts ripped from d.weber]
  7.  
  8.  ******************************************************************************
  9.  
  10.  this script reports no errormessage if the active source is not yet assembled
  11.  this will probably be improved in a future release, but who cares....
  12.  
  13.  ******************************************************************************/
  14.  
  15.  
  16. OPTIONS RESULTS                /* uups... */
  17.  
  18.  
  19. GETPORT                /* get the arexx_port of */
  20. ttx_port = result            /* the active window */
  21. GETFILEPATH                /* get the filepath */
  22. name = result
  23.  
  24.  
  25. ADDRESS 'asx_rexx'            /* address asx */
  26. FindID 'TTX:'name            /* find active source */
  27. port = result                /* get its port */
  28.  
  29.  
  30. IF port ~='' THEN DO            /* if ther is a port */
  31.   ADDRESS (''||port)            /* address it */
  32.   NextError                /* get the next error */
  33.   errortxt = result
  34.  
  35.  
  36.   ADDRESS (''||ttx_port)            /* address active window */
  37.   IF errortxt ='' THEN DO            /* if there are no more errors */
  38.     SETSTATUSBAR 'no more errors'        /* write to windowtitlebar */
  39.     exit(0)                /* skip the rest */
  40.     END
  41.  
  42.  
  43.   PARSE VALUE errortxt WITH 1 LineNumber ' : ' ErrorMsg         /* get the linenumber and error */
  44.   SHOWFOLDS ALL                /* show folds (to see errors) */
  45.   MOVE LineNumber 1            /* jump to errorline */
  46.   SETSTATUSBAR ErrorMsg            /* write to windowtitlebar */
  47.   END
  48.