home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Programming / ace_gpl_release / submods / runprog / test.b < prev    next >
Encoding:
Text File  |  1996-08-28  |  404 b   |  19 lines

  1. {* A test of the RunProg function. *}
  2.  
  3. #include <SUBmods/RunProg.h>
  4.  
  5. LONGINT result, stackSize
  6. STRING prg, args
  7.  
  8. prg = InputBox$("Enter program path and name")
  9. args = InputBox$("Enter command-line arguments")
  10. stackSize = 8000
  11.  
  12. result = RunProg(prg, args, stackSize)
  13.  
  14. IF result = -1 THEN 
  15.   MsgBox "RunProg: an error occurred.","Continue"
  16. ELSE
  17.   MsgBox "RunProg returned: "+STR$(result),"Continue"
  18. END IF
  19.