home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cenvi23.zip / SESSIONS.CMD < prev    next >
OS/2 REXX Batch file  |  1994-08-12  |  5KB  |  115 lines

  1. @echo OFF
  2. REM **********************************************************
  3. REM *** Sessions.cmd - Show lots of examples for using the ***
  4. REM *** ver.3          SESSION.CMD utility.                ***
  5. REM **********************************************************
  6.  
  7. cls
  8. ECHO This is an example of many of the ways you can use the
  9. ECHO Session.cmd. Utility.
  10. ECHO  
  11. ECHO This First example is a standard OS/2 windowed session.
  12. pause
  13. ECHO Session /Title "Plain OS/2 Window" /WIN /F
  14. CALL Session /Title "Plain OS/2 Window" /WIN /F
  15. pause
  16. CALL KILL "Plain OS/2 Window" > NUL
  17.  
  18. cls
  19. ECHO Now create a standard DOS window
  20. pause
  21. ECHO Session /Title "Plain DOS Window" /WIN /DOS /F
  22. CALL Session /Title "Plain DOS Window" /WIN /DOS /F
  23. pause
  24. CALL KILL "Plain DOS Window" > NUL
  25.  
  26. cls
  27. ECHO For these windowed DOS and OS/2 sessions, you can also specify window
  28. ECHO position and font sizes.  In this examples, many DOS and OS/2 windows
  29. ECHO will be created in the foreground, at different locations and with
  30. ECHO different font sizes
  31. pause
  32. ECHO Session /Title "OS/2 8x8 @ 0,t0" /WIN /F /FONT 8x8 /POS 0,t0
  33. CALL Session /Title "OS/2 8x8 @ 0,t0" /WIN /F /FONT 8x8 /POS 0,t0
  34. ECHO Session /Title "DOS 10x6 @ 15,t15" /DOS /WIN /F /FONT 10x6 /POS 15,t15
  35. CALL Session /Title "DOS 10x6 @ 15,t15" /DOS /WIN /F /FONT 10x6 /POS 15,t15
  36. ECHO Session /Title "OS/2 10x8 @ 30,t30" /WIN /F /FONT 10x8 /POS 30,t30
  37. CALL Session /Title "OS/2 10x8 @ 30,t30" /WIN /F /FONT 10x8 /POS 30,t30
  38. ECHO Session /Title "DOS 12x8 @ 45,t45" /DOS /WIN /F /FONT 12x8 /POS 45,t45
  39. CALL Session /Title "DOS 12x8 @ 45,t45" /DOS /WIN /F /FONT 12x8 /POS 45,t45
  40. ECHO Session /Title "OS/2 14x6 @ 60,t60" /WIN /F /FONT 14x6 /POS 60,t60
  41. CALL Session /Title "OS/2 14x6 @ 60,t60" /WIN /F /FONT 14x6 /POS 60,t60
  42. ECHO Session /Title "DOS 14x8 @ 75,t75" /DOS /WIN /F /FONT 14x8 /POS 75,t75
  43. CALL Session /Title "DOS 14x8 @ 75,t75" /DOS /WIN /F /FONT 14x8 /POS 75,t75
  44. ECHO Session /Title "OS/2 16x8 @ 90,t90" /WIN /F /FONT 16x8 /POS 90,t90
  45. CALL Session /Title "OS/2 16x8 @ 90,t90" /WIN /F /FONT 16x8 /POS 90,t90
  46. ECHO Session /Title "DOS 18x8 @ 105,t105" /DOS /WIN /F /FONT 18x8 /POS 105,t105
  47. CALL Session /Title "DOS 18x8 @ 105,t105" /DOS /WIN /F /FONT 18x8 /POS 105,t105
  48. pause
  49. CALL KILL "OS/2 8x8 @ 0,t0" > NUL
  50. CALL KILL "DOS 10x6 @ 15,t15" > NUL
  51. CALL KILL "OS/2 10x8 @ 30,t30" > NUL
  52. CALL KILL "DOS 12x8 @ 45,t45" > NUL
  53. CALL KILL "OS/2 14x6 @ 60,t60" > NUL
  54. CALL KILL "DOS 14x8 @ 75,t75" > NUL
  55. CALL KILL "OS/2 16x8 @ 90,t90" > NUL
  56. CALL KILL "DOS 18x8 @ 105,t105" > NUL
  57.  
  58. cls
  59. ECHO You can also start PM sessions, with size and positions
  60. pause
  61. ECHO Session /Title "Maximum OS/2 Editor" /PM /MAX /B E.EXE Register.doc
  62. CALL Session /Title "Maximum OS/2 Editor" /PM /MAX /B E.EXE Register.doc
  63. ECHO Session /Title "Minimum OS/2 Editor" /PM /MIN /B E.EXE Register.doc
  64. CALL Session /Title "Minimum OS/2 Editor" /PM /MIN /B E.EXE Register.doc
  65. ECHO Session /Title "Positioned OS/2 Editor" /PM /POS 50,150 /B E.EXE Register.doc
  66. CALL Session /Title "Positioned OS/2 Editor" /PM /POS 50,150 /B E.EXE Register.doc
  67. ECHO Session /Title "Sized OS/2 Editor" /PM /SIZE 300,200 /B E.EXE Register.doc
  68. CALL Session /Title "Sized OS/2 Editor" /PM /SIZE 300,200 /B E.EXE Register.doc
  69. pause
  70. CALL KILL "Maximum OS/2 Editor" > NUL
  71. CALL KILL "Minimum OS/2 Editor" > NUL
  72. CALL KILL "Sized OS/2 Editor" > NUL
  73. CALL KILL "Positioned OS/2 Editor" > NUL
  74.  
  75. cls
  76. ECHO You can also set any of the "DOS Settings..." variables.
  77. ECHO In these examples some will be set directly, and others will be
  78. ECHO set through an environment variable.  Here a few DOS sessions
  79. ECHO will be started with different memory settings.
  80. pause
  81. ECHO  
  82. ECHO Session /Title "480K DOS Session" /SET DOS_RMSIZE=480 /DOS /WIN /FONT 8x8 /F /POS 0,0 command.com "/K mem.exe"
  83. CALL Session /Title "480K DOS Session" /SET DOS_RMSIZE=480 /DOS /WIN /FONT 8x8 /F /POS 0,0 command.com "/K mem.exe"
  84. ECHO  
  85. ECHO Session /Title "560K DOS Session, No EMS" /SET DOS_RMSIZE=560 /SET EMS_MEMORY_LIMIT=0 /DOS /WIN /FONT 8x8 /F /POS 40,40 command.com "/K mem.exe"
  86. CALL Session /Title "560K DOS Session, No EMS" /SET DOS_RMSIZE=560 /SET EMS_MEMORY_LIMIT=0 /DOS /WIN /FONT 8x8 /F /POS 40,40 command.com "/K mem.exe"
  87. ECHO  
  88. ECHO SET MY_DOS_SETTINGS=DOS_RMSIZE,280;EMS_MEMORY_LIMIT,8192
  89. SET MY_DOS_SETTINGS=DOS_RMSIZE,280;EMS_MEMORY_LIMIT,8192
  90. ECHO Session /Title "280K DOS Session, 8K EMS" /SET #MY_DOS_SETTINGS /DOS /WIN /FONT 8x8 /F /POS 80,80 command.com "/K mem.exe"
  91. CALL Session /Title "280K DOS Session, 8K EMS" /SET #MY_DOS_SETTINGS /DOS /WIN /FONT 8x8 /F /POS 80,80 command.com "/K mem.exe"
  92. ECHO  
  93. pause
  94. CALL KILL "280K DOS Session, 8K EMS" > NUL
  95. CALL KILL "560K DOS Session, No EMS" > NUL
  96. CALL KILL "480K DOS Session" > NUL
  97. SET MY_DOS_SETTINGS=
  98.  
  99. cls
  100. ECHO Here's two Windows programs: NotePad and File Manager.  NotePad will be
  101. ECHO started in standard mode, and File Manager will run in Enhanced mode.
  102. ECHO Note that SESSION.CMD does not set the title of a Windows session, and
  103. ECHO so the title specified must be the title that Windows gives to that session.
  104. pause
  105. ECHO  
  106. ECHO Session /W /SEP /POS 0,0 /SIZE 300,400 NotePad
  107. CALL Session /W /SEP /POS 0,0 /SIZE 300,400 NotePad
  108. ECHO  
  109. ECHO Session /W /ENH /SEP /POS 50,60 /SIZE 300,400 /Title "File Manager" WinFile
  110. CALL Session /W /ENH /SEP /POS 50,60 /SIZE 300,400 /Title "File Manager" WinFile
  111. ECHO  
  112. pause
  113. CALL KILL "File Manager" > NUL
  114. CALL KILL NotePad > NUL
  115.