RtvReco User's Manual

This user manual applies to RtvReco version 42, and is provided for users of that version who have chosen not to upgrade to the latest edition. If you would prefer to update, you can download the latest version from this page.


bulletThe General Idea
bulletChanges Since The Last Version
bulletWhat The Tabs Do
bulletDefining An Action
bulletChanging The Timings
bulletHow It Works
bulletCredit Where It's Due

The General Idea

RtvReco is based on a very simple idea. Simply put, it pushes buttons in dialog boxes without user intervention. Since a large amount of time spent in Windows is getting rid of dialog boxes that always ask the same question and want the same answer, it is a surprise that no-one thought of doing this before. Then again, maybe they did but I simply don't know about it. Whatever the case, RtvReco does exactly what I have just described.

In addition, and as the product has grown with users' comments and ideas, RtvReco can select items in menus, minimise and maximise windows, and run batch files after finding various dialog boxes. All of this is customisable to suit either your language-version of Windows or to do things I never thought of.

Talking of which, I would like to point out that using RtvReco as a method to get rid of "nag" screens in other people's shareware sort of defeats the point of shareware altogether. I know people are using it like that, and that's up to them, but I want to make it clear that I don't condone that sort of usage. Okay, so that's the end of the lecture, and hopefully the end of any lawsuits.

Changes Since The Last Version

Version 30 only had 3 dialog box entries, and couldn't choose menu items. That version was the first to sport tabbed dialog boxes.

Version 40 made a few improvements, the best of which was that it could sit in the Windows "icon tray" at the bottom right-hand corner of your screen. In addition, it added menu item selection and more dialog boxes.

Version 41 fixes a "blue screen of death" problem that some users found, and also allows you to run RtvReco completely invisibly.

Version 42 allows you to select partial menu item names, to get around the problem of menu items such as "Save Ctrl+S", which actually requires the tab character ("\t") to work correctly. It also contains some minor bug fixes.

What The Tabs Do

The tabs in the RtvReco properties dialog box enable you to change the settings which RtvReco uses. The two tabs you will probably use the most are the "Actions" and "Timings" tab. These, respectively, define the actions that RtvReco is going to perform, and change the timings that RtvReco uses for polling windows and running batch files.

Defining An Action

To define an action, go to the "Actions" tab and select the "Add" button. This will bring up a new dialog box on top of the properties dialog box in which you can put your settings.

The actions supported by RtvReco are: push a button; choose a menu; maximise a window; minimise a window; and do nothing at all. If you choose to do nothing, you can still run a batch file at the time the window is found by RtvReco (or later if you choose to delay it).

In addition, you can stop RtvReco polling for the specified window for a given amount of time. This only comes into affect if RtvReco has already found the window. For example, if you want RtvReco to poll for a dialog window called "Example Window", and then you set the "Don't Poll Again For" amount to 25 seconds, each time the "Example Window" window appears, RtvReco will check whether it has found it in the last 25 seconds and if it has, it will ignore it.

When you are entering the names of items such as buttons, menus or menu items, be careful to take into account the underlining of letters. For example, if the option you wish to select from a menu is on the "Window" menu and is called "Arrange All", you need to specify the menu "&Window" and the item "&Arrange All". If the item had been called "Arrange All", it would have been "Arra&nge All". RtvReco can match partial menu items, but you still need to enter the ampersand (&) if it is contained in the partial part of the item.

Changing The Timings

RtvReco uses two sets of timings. One is for the actual polling of windows, which is the most important value. The second one is for running the batch file. Both of these values can be between 1 and 60 seconds. To change them, select the "Timings" tab and then change the appropriate trackbar.

Settings a polling time of less than 2 seconds may impact on your system performance, especially if you have defined a large (greater than 5) number of actions. I would recommend you leave the polling time at about 3 seconds; what you lose in time waiting for RtvReco to find a window you will probably gain in optimal system performance.

How It Works

This section is for programmers and people curious about the internal working of RtvReco. For people who can read (and understand!) C source code, click here to see the main source file.

Basically, RtvReco starts a timer loop that Windows maintains and sends it messages when the timer is active. In other words, assuming the timer is set to 5 seconds, RtvReco will get a message approximately every 5 seconds telling it to do something. The message is a WM_TIMER message, for those who care.

On receiving the message, RtvReco calls the FindWindow() function specifying the name of the window and no class. This returns the handle of all windows with the given name, so it doesn't limit the search to dialog box classes. The first thing RtvReco checks for is that the handle returned is valid. If not, then the window doesn't exist and it shouldn't do anything else for this timer message.

If, however, the window is found, then RtvReco needs to perform whatever action has been specified in the "Actions" dialog box. As an example, consider pushing a button. RtvReco needs first to find the button specified, and then push it. So, to find the button, we could call the FindWindow() function again or we could limit the search. RtvReco uses the EnumChildWindows() function to look through all windows on the dialog box it found originally. If it finds a window (actually, a button) that has the same title as the user has specified, it stops the enumeration by returning FALSE, and then saves the window handle.

To actually push the button, RtvReco performs a bit of a fudge. Whenever a button is pressed, Windows sends the parent window a WM_COMMAND message with the ID of the button as one of the parameters. This only happens for "real" windows, not ones that applications simulate themselves. Consequently, in the vast majority of applications that don't simulate their own buttons, RtvReco can simply mimic the default Windows behaviour by figuring out the correct parameters to pass in the WM_COMMAND message and then send it.

The parameters used can be found very easily. They are stored in the window bytes for each child window, and can therefore be retrieved using the GetWindowLong() function. The one that is most important is at the offset GWL_ID, which is the ID for that window. If the window is a button, that ID corresponds to the ID passed in the WM_COMMAND message.

Credit Where It's Due

RtvReco was written in response to a request made on the Internet. In actual fact, the people responsible for getting me to write this software can usually be found in the #windows95 channel on IRC.

Shaddow (Kevin Mooney) made that request, so you really have him to thank (or curse) for RtvReco. However, many of the features added since the rather inadequate version 10 were due to other peoples suggestions. Amongst these people are: WinX (Tim Yocum), Francois Marier (responsible for the task bar suggestion), Massimo Dalla Barba, Richard Puga, Eric Koske (responsible for the move to more than one dialog box), Ken Fowler (stopped me getting sued by Amdox Corporation), Adam Allouba, Steve Withey, and Benjamin Quincy Cabell V.

Very special thanks go to "discord" and "tbp" in #windows95 for beta-testing the software, along with "Minder" in the same channel for giving me useful feedback.


RtvReco is provided "AS IS" without warranty of any kind, either express or implied. In no event shall Jeremy Gelber or RTV Software be held liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.


Send mail to webmaster@rtvsoft.com with questions or comments about this web site.
Copyright 2003 RTV Software
Last modified: Tuesday, 25 February 2003 07:25