home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / swmst094.zip / readme.txt < prev    next >
Text File  |  1995-05-24  |  15KB  |  365 lines

  1. NOTE: This is beta software.  Please don't run this program on
  2. machines that would get you in a lot of hot water if something goes
  3. wrong.  Please see the file TODO before filing a bug report and see if
  4. it isn't something that I'm already working on.
  5.  
  6.  
  7. Introduction
  8. ------------
  9.  
  10. Thank you for trying SwitchMaster.
  11.  
  12. SwitchMaster is a small utility that allows the user to control which
  13. tasks should/shouldn't be seen in the OS/2 Window List (CTRL+ESC),
  14. Jump Sequence (ALT+ESC), or both.
  15.  
  16. Background
  17. ----------
  18.  
  19. I wrote SwitchMaster because I don't like having open folders included
  20. in the OS/2 Window List.  Trying not to re-invent the wheel, I
  21. evaluated some of the other 'Window List control' type utilities but
  22. none of them did exactly what I wanted them to do.  It seemed like the
  23. perfect reason to put all the money I've spent on OS/2 programming
  24. books to good use.  Now you get to enjoy the fruits of my labor.  As
  25. this is my first 'real' OS/2 program, I'd appreciate as much feedback
  26. as possible.
  27.  
  28. Aside from SwitchMaster being the first OS/2 PM program I've ever
  29. written, this is also the first utility I've felt is useful enough to
  30. release publicly for others to evaluate.  Taking that into account,
  31. please try to keep the flames to a minimum if/when you find a bug.
  32. The idea is to encourage me to keep on releasing new utilities for
  33. OS/2. :)
  34.  
  35.  
  36. Requirements
  37. ------------
  38.  
  39. SwitchMaster was written using the emx development system version 0.9a
  40. with the third series of fixes (emxfix03.zip).  To run SwitchMaster
  41. you will need to have installed that level or greater of the emx
  42. runtime libraries.  The required DLL's are not included here.  You can
  43. find the required DLL's at
  44.  
  45.     ftp://ftp-os2.nmsu.edu/os2/32bit/unix/emx09a/emxrt.zip
  46.  
  47. - SwitchMaster will only run on OS/2 2.1 and later.
  48.  
  49.  
  50. E-Mailware!
  51. -----------
  52.  
  53. SwitchMaster is E-Mailware.  What that means is that you can do
  54. whatever you want with the program as long as you send me some E-Mail
  55. telling me how you liked it (or didn't like it).  My E-Mail address is
  56. listed at the end of this document.  Other than that, SwitchMaster is
  57. 100% free of charge.  With that price, you also get something
  58. else...NO WARRANTY.
  59.  
  60. Disclaimer (the non-legalese form): If there are bugs in SwitchMaster
  61. that totally destroy your computer (which I highly doubt there are),
  62. don't blame me.  If you use this program, you are doing so at your own
  63. risk.
  64.  
  65.  
  66. Bug reporting
  67. -------------
  68.  
  69. If you do find a bug in SwitchMaster (which I'm sure there are some),
  70. please let me know.  As this is supposed to be a learning experience
  71. for me, I want to find out what I did wrong so I don't do it again.
  72. My E-Mail address is listed at the end of this document.
  73.  
  74.  
  75. Usage
  76. -----
  77.  
  78. SwitchMaster is pretty easy to use.  Just create a program object that
  79. points to whatever directory you put SwitchMaster in and fire it up.
  80.  
  81. NOTE: SwitchMaster expects to see its initialization file in the
  82. same directory that it was started from.  With that in mind, you may
  83. want to specify the SwitchMaster directory in the field marked
  84. 'Working Directory' in the program object settings.
  85.  
  86. Once SwitchMaster is up and running, you should be greeted with the
  87. SwitchMaster main window.
  88.  
  89.  
  90. The SwitchMaster Window
  91. -----------------------
  92.  
  93. The radio buttons grouped under the heading 'Remove From' denote where
  94. you want the task(s) to be removed from.  There you will find three
  95. options:
  96.  
  97.     o Window List
  98.     o Jump Sequence
  99.     o Both
  100.  
  101. Selecting 'Window List' removes the tasks from the Window List only
  102. (i.e. what shows up when you hit CTRL+ESC).  This way you can still
  103. jump to the task via ALT+ESC, but you can't see it in the Window List.
  104.  
  105. Selecting 'Jump Sequence' removes the tasks from the ALT+ESC Jump
  106. Sequence only.  This way you can still see the task in the Window
  107. List, but you can't switch to it using the ALT+ESC keystroke.
  108.  
  109. Selecting 'Both' removes the tasks from both the Window List and the
  110. Jump Sequence so the tasks are completely invisible to OS/2's
  111. switching mechanism.
  112.  
  113. The check boxes grouped under the heading 'Remove' define what tasks
  114. should be removed.  There you will find six options and a button:
  115.  
  116.     o Folders
  117.     o All PM Apps
  118.     o Seamless Win Apps (disabled)
  119.     o Full Screen Win Apps (disabled)
  120.     o DOS Apps
  121.     o OS/2 Text Apps
  122.     o Setup...
  123.  
  124. Selecting 'Folders' will activate the 'folders kludge' (see section
  125. titled _Technical Stuff_) and try to remove any open folders from the
  126. Window List.  Please let me know how this works on your machine.
  127.  
  128. Selecting 'All PM Apps' removes all Presentation Manager applications
  129. from the Window List.  Since all folders are, by definition, PM tasks,
  130. selecting this option will disable the 'Folders' checkbox.
  131.  
  132. Selecting 'Seamless Win Apps' will remove all Windows applications
  133. that are running seamlessly on your Desktop from the Window List.
  134. THIS OPTION IS CURRENTLY DISABLED.  Please see the section titled
  135. "Common Questions & Answers" for an explanation.
  136.  
  137. Selecting 'Full Screen Win Apps' will remove all Windows applications
  138. that are running in a full screen Windows session from the Window
  139. List.  THIS OPTION IS CURRENTLY DISABLED.  Please see the section
  140. titled "Common Questions & Answers" for an explanation.
  141.  
  142. Selecting 'DOS Apps' will remove all windowed and full screen DOS
  143. applications from the Window List.  Please see the section titled
  144. "Common Questions & Answers" for an explanation of odd behavior that
  145. may occur when selecting this option.
  146.  
  147. Selecting 'OS/2 Text Apps' will remove all windowed and full screen
  148. OS/2 applications from the Window List.
  149.  
  150. The setup button is described below in the section titled "The Tasks
  151. to Store Window".
  152.  
  153. Taking up the good portion of the lower half of the window is a
  154. listbox titled 'Removed Tasks'.  This window will show you what tasks
  155. are currently being removed.  This window will change when tasks are
  156. opened and closed.
  157.  
  158. Above the 'Removed Tasks' window is a spin button labeled 'Timer'.
  159. 'Timer' defines how often SwitchMaster should look at the Window List
  160. and take out the offending tasks.  This number can be anywhere from 1
  161. to 10 seconds.
  162.  
  163.  
  164. The Tasks to Store Window
  165. -------------------------
  166.  
  167. Pressing the 'Setup...' button in the Remove group will bring up a
  168. dialog box titled "Tasks to Store".  This dialog box allows you
  169. greater control to specify only certain tasks to remove from the
  170. switch list.  
  171.  
  172. On the left side of the dialog box, a listbox shows whichs tasks are
  173. currently availble for removing.  Only those tasks which aren't
  174. already being removed by selecting the aforementioned checkboxes will
  175. be listed here.  For example, if you have 'All PM Apps' selected on
  176. the main screen, then only Windows, DOS, and OS/2 Text Mode
  177. applications will be listed.
  178.  
  179. On the right side of the dialog box is a listbox which shows which
  180. tasks have been defined by you to be removed.  Only tasks specifically
  181. defined by you will be listed in this window.
  182.  
  183. To flag a task to be removed, highlight the task in the 'Current
  184. Tasks' window and click the 'Store ->' button.  If the task isn't
  185. already there, it will be moved to the 'Stored Tasks' window.  Do this
  186. for each task you wish to flag for removal.
  187.  
  188. When you have flagged all the tasks you want, press the OK button.
  189. You should now see those tasks you've flagged appear in the 'Removed
  190. Tasks' window.
  191.  
  192. If you wish to save your selections for the next time SwitchMaster is
  193. run, select the 'Save Settings' option from the 'File' menu.
  194.  
  195. To remove a task from the 'Stored Tasks' list, select the task you no
  196. longer want SwitchMaster to process, and click the '<- Remove' button.
  197. If the task isn't already in the 'Current Tasks' list (which it
  198. shouldn't be), it will be moved there.  Repeat this step for all tasks
  199. that you don't want SwitchMaster to process anymore.
  200.  
  201.  
  202. The Menu Bar
  203. ------------
  204.  
  205. The 'File' menu has one option: 'Save Settings'.  Select this when
  206. you've got all the options set up the way you want.  That way the next
  207. time you run SwitchMaster, it will default to those options.
  208.  
  209. The 'Options' menu has two options:
  210.  
  211.     o Start Minimized
  212.     o Exit After Load
  213.  
  214. When 'Start Minimized' is checked SwitchMaster will start in a
  215. minimized state the next time it is started.
  216.  
  217. When 'Exit After Load' is checked, SwitchMaster will start with all
  218. the current options set, stay in memory for 5 seconds, then exit.  All
  219. tasks that SwitchMaster removes will not be added back to the Window
  220. List when it exits.  This option is handy for users who want just a
  221. couple of tasks removed on startup, but don't want SwitchMaster in
  222. memory taking up clock cycles and memory after that.  To set
  223. SwitchMaster up for Exit After Load:
  224.  
  225.     o Check the option under the Options menu
  226.     o Save the settings (under File menu)
  227.     o Exit and restart SwitchMaster
  228.  
  229. SwitchMaster will then load, process the current window list, and
  230. exit, leaving whatever tasks it processed out of the Window List.
  231.  
  232. To turn this option off, run SwitchMaster and uncheck the Exit After
  233. Load option.  You only have 5 seconds to do this so be prepared!
  234. Remember to save the settings again so SwitchMaster knows not to exit
  235. again the next time it loads.
  236.  
  237. If you load SwitchMaster again after it has run through the Exit After
  238. Load processing, you will notice that already removed tasks don't show
  239. up in the Removed Tasks list.  This is expected behavior as
  240. SwitchMaster only removes tasks that aren't already removed.
  241.  
  242. NOTE:  You cannot get the items SwitchMaster removes back into the
  243. Window List unless you reboot your machine or close/start all the
  244. windows that SwitchMaster processed.
  245.  
  246. The 'Help' menu has one option: 'About SwitchMaster'.  That is pretty
  247. self-explanatory.
  248.  
  249. NOTE: Be sure to select Save Settings under the File menu whenever you
  250. make a change.  By design, SwitchMaster allows experimentation of
  251. options and only permanently sets them when Save Settings is selected.
  252. SwitchMaster will not warn you when exiting that options have been
  253. changed since it was started.
  254.  
  255. That's it for what it takes to run SwitchMaster.
  256.  
  257.  
  258. Technical stuff
  259. ---------------
  260.  
  261. As mentioned before, in my evaluation of the other utilities that do
  262. the same sort of thing that SwitchMaster does, I noticed one sorely
  263. lacking feature, that being removing open folders from the Window
  264. list.  After reading up on how OS/2 stores entries in the Window List,
  265. I discovered that there is a reason why this feature hasn't popped up
  266. yet anywhere else...OS/2 doesn't differentiate open folders from other
  267. PM programs!  This makes is difficult to block only the folders
  268. without also turning off other PM programs that are running.
  269.  
  270. The solution: After spending quite a few hours in the debugger trying
  271. to figure out how to make the 'best guess' at telling the difference
  272. between PM apps and folders, I discovered that all open folders had
  273. the same session ID as the Desktop.  Bingo!  The only problem is that
  274. there are other applications that also share the Desktop session ID.
  275. Most notably:
  276.  
  277.     o The Desktop itself
  278.     o The Minimized Window Viewer (also a folder)
  279.     o The LaunchPad (OS/2 Warp only)
  280.     o The Workplace Shell
  281.     o Probably some others...
  282.  
  283. The solution then, was to 'scan' for the Desktop ID and remove
  284. everything with that same ID, except those tasks outlined above.  Yes,
  285. it's a kludge, but it's the best solution I've found so far.  If you
  286. can think of any other way, I'm all ears.
  287.  
  288. The drawback is obvious, if there are other tasks that share the same
  289. session ID as the Desktop that I didn't define above, they also get
  290. taken out of the Window List.  This includes most object defined in
  291. the Templates folder (scheme palette's, etc).  The only way around
  292. this is to scan for all the SOM objects and make sure they stay put.
  293. As I don't have access to the SOM toolkit, this isn't going to happen
  294. for awhile.
  295.  
  296. NOTE: SwitchMaster performs it's magic by looking at a window's title.
  297. If, for instance, you renamed your 'Minimized Window Viewer' to 'Min
  298. Window Viewer', SwitchMaster will not see it.  Perhaps I'll add the
  299. functionality to define window titles in a later release.
  300.  
  301.  
  302. Common Questions & Answers
  303. --------------------------
  304.  
  305. Q: When I close a window that SwitchMaster has removed from the Window
  306. List, the focus isn't always returned to the window that opened the
  307. one that I'm closing!  What gives?
  308.  
  309. A: Actually this occurs only when you tell SwitchMaster to remove
  310. tasks from the Jump Sequence (or Both).  OS/2 deals with open Windows
  311. on the Desktop in a strange way.  Even though, for example, a folder
  312. opened within another folder would appear to have some sort of
  313. parent/child relationship, it doesn't.  The sub-window is owned by the
  314. Desktop not the window that opened it.  OS/2 appears to use the Jump
  315. Sequence order to determine which window to return the focus to when
  316. another window is closed.  Since SwitchMaster will alter the Jump
  317. Sequence if asked to, it messes up this internal ordering.  The
  318. solution would be to write a system hook that scans for all WM_CLOSE
  319. messages, puts the original Jump Sequence back the way it was, let OS/2
  320. process the call, then put the altered Jump Sequence back.  As system
  321. hooks are supposed to be quick, I decided not to implement it.  For
  322. now, the only thing that can be done is either live with it, or only
  323. select for windows to be removed from the Window List.  I might come
  324. back to this later.
  325.  
  326. Q: Why are the 'Seamless Win Apps' and 'Full Screen Win Apps'
  327. checkbox's disabled and why is the 'DOS Apps' checkbox also removing
  328. Windows tasks from the switch list?
  329.  
  330. A: The OS/2 C header files define different program-type ID's for the
  331. various executable types that it can execute.  However, it appears to
  332. ignore the program types defined for Windows applications and lumps
  333. them under the catagory of DOS apps.  Thus, by selecting either of the
  334. 'Win Apps' checkboxes in SwitchMaster, nothing would happen.
  335. Selecting the 'DOS Apps' checkbox, however, ends up removing not only
  336. the DOS apps, but the Windows apps, too.  I guess this makes sense
  337. since Windows requires DOS to run, but why are there different program
  338. ID's defined in the headers then?  I asked the question 3 times on
  339. comp.os.os2.programmer.misc, but nobody ever came up with an answer.
  340. Needless to say, until I can figure out how to reliably determine the
  341. difference between a DOS task and a Windows task, the options for Win
  342. Apps will remain disabled, and selecting 'DOS Apps' will also process
  343. all running Windows applications.
  344.  
  345. Q: My SWMASTER.INI file got corrupted and SwitchMaster is having a
  346. tizzy fit.
  347.  
  348. A: SwitchMaster is a small utility and doesn't have a lot of extra
  349. fancy features.  There is no 'recovery mode' or 'regenerate mode' if
  350. the INI file becomes corrupted.  The easiest solution is to keep a
  351. copy of the archive file around and re-extract the default INI file if
  352. yours should break.
  353.  
  354.  
  355. Author Info
  356. -----------
  357.  
  358. To reach me and tell me what you think (and/or report a bug), send
  359. your E-Mail off to:
  360.  
  361.     Wes Santee
  362.     wsantee@wsantee.oz.net  <--- new e-mail address
  363.  
  364. Enjoy!
  365.