home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / input / exam16.dba < prev    next >
Encoding:
Text File  |  2000-04-01  |  808 b   |  33 lines

  1. Rem * Title  : Shell Execution
  2. Rem * Author : DBS-LB
  3. Rem * Date   : 1st April 2000
  4. rem ============================================
  5. rem DARK BASIC EXAMPLE PROGRAM 16
  6. rem ============================================
  7. rem This program handles the execution of a file
  8. rem --------------------------------------------
  9.  
  10. rem Make small text file
  11. filename$="text.txt"
  12. if file exist(filename$)=1 then delete file filename$
  13. open to write 1,filename$
  14. write string 1,"My Text Document "+str$(rnd(100))+"."
  15. write string 1,"The End!"
  16. close file 1
  17.  
  18. rem Execute shell
  19. directory$=""
  20. commandline$=filename$
  21. execute file "C:\Windows\NOTEPAD.EXE",commandline$,directory$
  22.  
  23. rem End of program
  24. sync on
  25. while inkey$()=""
  26. cls
  27. print "Welcome back to DarkBASIC"
  28. print "Press Any Key"
  29. sync
  30. endwhile
  31. end
  32.  
  33.