home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games 1995 January / amigagames-1995-01.iso / archive / userbox / publicdomain / ged313.lha / Install / data / main / GoldED / arexx / dcc.ged < prev    next >
Text File  |  1993-07-18  |  2KB  |  73 lines

  1. /* $VER: 0.9, ©1993 Dietmar Eilert. Compile current file using DICE-C  */
  2.  
  3. OPTIONS RESULTS                             /* enable return codes     */
  4.  
  5. if (LEFT(ADDRESS(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  6.     address 'GOLDED.1'
  7.  
  8. 'LOCK CURRENT'                              /* lock GUI, gain access   */
  9. OPTIONS FAILAT 6                            /* ignore warnings         */
  10. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  11.  
  12. /* ------------------------- INSERT YOUR CODE HERE: ------------------ */
  13.  
  14. 'QUERY CAT'
  15. isGerman = (result = "deutsch")
  16.  
  17. 'QUERY ANYTEXT'
  18.  
  19. if (result = 'TRUE') then 
  20.  
  21.     do
  22.  
  23.         'QUERY DOC VAR OLDNAME'             /* remember current file name */
  24.         'SAVE ALL NAME="T:TEST.C"'          /* create temorary file */
  25.  
  26.         shell                               /* address shell */
  27.  
  28.         'dcc T:TEST.C -// -LDINCLUDE: -oT:TEST'
  29.  
  30.         ok = (RC = 0)
  31.  
  32.         shell                               /* address host (GoldED) */
  33.  
  34.         'NAME NEW ' || oldname              /* restore old file name */
  35.  
  36.         if (ok) then do
  37.  
  38.             if (isGerman) then
  39.                 'REQUEST BODY="DCC fertig. Programm starten ?" BUTTON="_starten|_abbrechen"'
  40.             else
  41.                 'REQUEST BODY="DCC done. Run program ?" BUTTON="_run|_cancel"'
  42.  
  43.             if (result = 1) then do
  44.  
  45.                 'QUERY CON VAR CON'
  46.  
  47.                 shell
  48.                 'T:TEST >' || CON
  49.                 shell
  50.  
  51.             end
  52.         end
  53.     end
  54.  
  55. else do
  56.  
  57.     if (isGerman) then
  58.         'REQUEST BODY="Kein Text vorhanden ?!"'
  59.     else
  60.         'REQUEST BODY="Text buffer is empty ?!"'
  61. end
  62.  
  63. /* ---------------------------- END OF YOUR CODE ----------------------- */
  64.  
  65. 'UNLOCK' /* VERY important: unlock GUI */
  66. EXIT
  67.  
  68. SYNTAX:
  69.  
  70. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  71. 'UNLOCK'
  72. EXIT
  73.