home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / EDGE1_704.DMS / in.adf / Edge_Rexx.lha / OpenDOSShell.edge < prev    next >
Encoding:
Text File  |  1993-10-27  |  1.0 KB  |  40 lines

  1.  
  2. /*
  3. ** $VER: OpenDOSShell.edge 1.2 (Sunday 08-Aug-93 02:49:57)
  4. **
  5. ** Script to open a shell console on the Edge screen. The current directory
  6. **    will be set to the current files path or if the path is zero to Edge's
  7. **    current directory. The window position/size/title is expected in 
  8. ** _GE_User0, and the shell startup file in _GE_User1. 
  9. ** 
  10. ** Written by Thomas liljetoft
  11. */
  12.  
  13.  
  14. options results
  15.  
  16. 'getenvvar' _ge_screenname        /* get name of the screen we're running on */
  17. screenname = result
  18.  
  19. 'getenvvar' _fe_path                /* get path of the current file */
  20. path = result
  21.  
  22. 'getenvvar' _ge_user0            /* get window position/size/title */
  23. window = result
  24. if length(window) = 0 then window = "20/20/600/50/AmigaShell/close"
  25.  
  26. 'getenvvar' _ge_user1            /* get shell startup file */
  27. startup = result
  28.  
  29. /* cd the current path */
  30. call pragma(d,path)
  31.  
  32. /* now open the shell console */
  33.  
  34. if length(startup) ~= 0 then
  35.     address command newshell '"'"con:"window"/SCREEN "screenname'"' from startup
  36. else
  37.     address command newshell '"'"con:"window"/SCREEN "screenname'"'
  38.  
  39. exit(RC)
  40.