SendYes! A tool for automatically closing windowed text sessions V1.0 Copyright (C) 1995, Wes Santee V1.1 Copyright (C) 1995, Christian Langanke 0.0 Table of Contents --------------------- 1.0 Introduction 1.1 Background 1.2 Requirements 1.3 E-Mailware! 1.4 Bug reporting 1.5 Credits 2.0 Usage 2.1 Parameters 3.0 Technical stuff 4.0 Frequently Asked Questions 5.0 Author Info 1.0 Introduction ----------------- Thank you for trying SendYes! SendYes! is a small utility that looks for the default close boxes that pop up whenever OS/2 is closing a DOS or OS/2 Windowed or Fullscreen Text session. If it sees one being created, SendYes! automatically clicks the 'Yes' button for you. 1.1 Background -------------- Wes Santee: "I wrote SendYes! because I hated having to sit and click the 'Yes' button during system shutdown to close all of my windowed text sessions that were open. It's very much a kludge and may or may not work on your system. At this point, there are no guarantees. See the file CHANGES.TXT for problems you may run into." Section '3.0 Technical stuff' also gives further technical information about SendYes!. Since V1.1 of SendYes only msg boxes containing the particular PM confirmation messages for those VIO and fullscreen sessions are closed. This is done by comparing the message in the msg box dialog with the message expected for the confirmation boxes. In order to be compatible with every language version of OS/2, the message text for comparison is read out of a PM resource DLL. In V1.0 every message box with a yes button was intercepted and closed by automatically pressing the yes button. 1.2 Requirements ---------------- SendYes! V1.1 was compiled with the IBM C Set++ V2. The emx runtime is not longer needed as for V1.0. SendYes! has only been tested on OS/2 Warp 3.0. It makes several assumptions as to the ID's of some of the built-in dialog boxes that OS/2 will show on the screen. If it works on earlier versions of OS/2, great. To find out wether SendYes is working on your OS/2, execute TESTALL.CMD to bring up all four kind of sessions and close them with SendYes! active: if they close well without confirmation boxes, everything is fine. If not, please email and tell me so... 1.3 E-Mailware! ---------------- SendYes! is E-Mailware. What that means is you can do whatever you want with the program as long as - SendYes is not sold as a part of another program package - no fee is charged for the program other than for cost of media - the complete package is distributed unmodified - you send me some E-Mail telling me how you liked it (or didn't like it) My E-Mail address is listed at the end of this document. Other than that, SendYes! is 100% free of charge. With that price, you also get something else...NO WARRANTY. Disclaimer (the non-legalese form): If there are bugs in SendYes! that totally destroy your computer (which I highly doubt there are), don't blame me. If you use this program, you are doing so at your own risk. 1.4 Bug reporting ------------------ If you do find a bug in SendYes! (which I'm sure there are plenty), please let me know. Due to the nature of the program, I cannot guarantee I can fix any problems, but it doesn't hurt to try. My E-Mail address is listed at the end of this document. 1.5 Credits ------------------ All credits for the idea and the creating of the first version belong to Wes Santee, who developed V1.0 of SendYes (besides of a beta version before). 2.0 Usage ---------- The easiest way to run SendYes! is to create a program object for it, and put it in your Startup folder. If you aren't sure how to create a program object, consult your OS/2 documentation or the system tutorial. I recommend to put the SendYes! files in a separate directory, e.g. in a subdirectory below your utility directory, so that you can migrate easier to a future version. If you use a program object and leave the working dir undefined or specify the directory SendYes! is installed in, no modifications of PATH and LIBPATH variables in CONFIG.SYS are required, NOTE: - If you are calling SendYes from any other directory than the one it is installed in, you must put the file SENDDLL.DLL in a directory pointed to by the LIBPATH variable in your CONFIG.SYS file. - you can activate SendYes! only once. If you try to activate it mopre than once, you will receive an error msg box or an error beep (see parameter /Batch for details). 2.1 Parameters --------------- Since SendYes! does not have an interactive window, all options must be specified through command line options entered in the 'Parameters' entryfield for the program object. Here is a list of the supported parameters and what they do /Switchentry tells SendYes! to show itself in the CTRL+ESC window list so you can close it there. /Close closes active SendYes! session. If SendYes! is not active, specifying this parameter, you will receive an error msg box /Batch surpesses msg boxes and generates notification/alarm sounds instead on close and startup /Help or /? gives a help msg box NOTE: - specifying the first letter of the parameters is sufficient, so /C and /CLOSE is equivalent - the parameters are case insensitive, so parameters /CLOSE, /Close and /close are equivalent - the switch character preceding the parameters can be '/' or '-', so parameters /CLOSE or -close are equivalent 3.0 Technical stuff -------------------- SendYes! installs a hook which intercepts the system message queue and reads the message to be intercepted out of a PM resource DLL. There it waits for creation of msg boxes and if one receives the focus, it checks, wether the message text in the msg box is identical to the one read on startup. When this is the case, it sends a PM message to this msg box, which states that the yes button is pressed, so the confirmation box is closed with Yes! before it pops up. It is however possible, that SendYes! may not work under future versions of OS/2, because SendYes! uses hardcoded and undocumented resource IDs to identify msg boxes and to obtain the message shown in the message box. Also the resource ID of the message read out of the PM resources at startup is not documented and may change in future - although that is not very likely to happen. See section '1.2 Requirements' how to use TESTALL.CMD in order to easily find out, wether SendYes! is working correctly under your Version of OS/2. NOTE: - The first version of SendYes! came together with the source code. I think that most people out there just want to use a reliable and stable SendYes! and do not care for the code. So the source code is not longer shipped together with the executables, but if you however are interested in the sourcecode of SendYes!, you can obtain it by mailing me a request and I email you the source. 4.0 Frequently Asked Questions ------------------------------- Q: Hey, there's no user interface here! What's the big idea making me use command line parameters!? Where are my buttons!? A: SendYes! needs to be small and fast. A user interface would be needlessly wasteful of memory resources for something so simple. Q: How can I kill SendYes! once I start it? A: Execute 'SENDYES /Close' to close the active instance of SendYes!. Alternatively, use the '/Switchentry' parameter to tell SendYes! to appear in the CTRL+ESC task list. See '2.1 Parameters' for details. From there, highlight the task and hit the Delete key or click the right mouse button on the entry and select Close. Q: What's going to be in the next version of SendYes!? A: See changes.txt - section THINGS TO COME Q: How can I test wether SendYes! is 100% working under my version of OS/2? A: See section '1.2 Requirements' how to use TESTALL.CMD in order to find that out. 5.0 Author Info ---------------- Please email me your opinion about SendYes! (and/or report a bug). Author/Maintainer of current version: Christian Langanke, Germany Internet: cla@oerag.de Author of V1.00: Wes Santee Internet: wsantee@oz.net Enjoy!