Written by Joe Bork // joe@headblender.com // http://headblender.com/joe/
If you use Microsoft Outlook's support for IMAP, you've probably seen this error dialog before:

This is a ridiculous and annoying dialog that appears far too often if you every try to use Outlook in conjunction with another IMAP mail client, like a webmail client, or Mozilla Thunderbird, or even another instance of Outlook itself. Not only is this a stupid dialog, but it is completely pointless. Ook can help.
Ook ("Outlook dialOg Killer") is an program that sits in the System Notification area of the Windows Taskbar and waits for this dialog to appear. When it does appear, Ook dismisses the dialog without any intervention on your part.
Unfortunately, Ook does not currently prevent the error dialogs from appearing in the first place, nor does it prevent the Outlook dialog from attempting to steal focus from another application when the dialog appears. (These shortcomings may be addressed in a future version, but I make no promises.)
Ook has the following system requirements:
Currently Ook is only configured to work with Outlook 2003. Ook may work with previous versions of Outlook, but I have not tested them myself. If you are using a version of Outlook other than Outlook 2003 and you find that Ook does work (or even that it does not), please let me know.
Ook is a .NET application, and required that you have version 1.1 of the Microsoft .NET framework installed on you machine. If you know that you do not have this installed, or if you receive an error when trying to launch Ook, you can download and install the required software from here: http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3
As of version 2.2, Ook has an installer. Simply download the Ook MSI file and launch it. The setup program will give you the options of creating a desktop shortcut to Ook and of having Ook startup automatically when you login to Windows.
Ook is very simple to use. When you launch Ook, you will see this window appear:

By default, Ook will begin checking for the presence of the Outlook IMAP error dialog as soon as it starts up, and every 20 seconds after that. You can always have Ook check for and dismiss these dialogs at any time by clicking the "Check Now" button. If you prefer that Ook not check for and dismiss these dialogs automatically, you can clear the "Monitor Outlook IMAP warnings" checkbox.
The small black square at the upper right-hand corner of the window will blink whenever Ook automatically checks for the Outlook IMAP error dialog. If there is no dialog to dismiss, the square will blink green. If there is a dialog to dismiss, it will blink red. (Note that Ook will only dismiss one error dialog each time it checks, so if there are multiple error dialogs on the screen simultaneously, it may take a few polling cycles before Ook dismisses them all.)
You can access the Details view by pressing the "Details" button. This will reveal some additional information:

The details view allows you to change the delay between Ook's polling for the Outlook IMAP error dialog. You can choose any delay from 1 second to 300 seconds (or 5 minutes). Ook will remember both the polling delay and whether or not automatic polling is enabled the next time you launch Ook.
The "Warning count" is simply an indication of the number of dialogs Ook has found and dismissed since it was last launched. This count is always reset to zero after Ook exits.
Ook will also place its icon in the System Notification area of the Taskbar (located near the clock). The Ook icon looks like this:
![]()
When you minimize Ook, it will minimize itself so only this icon is displayed; Ook will not appear in the normal Taskbar list when it is minimized.
To restore Ook again, simply double-click on the Ook icon in the notification area. You can also access a few items from the Notification menu by right-clicking on the Ook icon:
That's about it.
Ook uses an XML configuration file to tell it what kinds of dialogs to look for each time it polls.
The first time Ook is launched, it will create a file called "OokConfig.xml" in the current user's "Application Settings\Ook" folder. This config file defines the characteristics of the kinds of windows Ook looks for to dismiss. By default, Ook knows about the Outlook 2003 IMAP error dialog, but in principle it would be possible to configure Ook to look for other similar dialogs.
This is the default config file Ook creates:
<?xml version="1.0" encoding="utf-8"?>
<OokPrey xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://headblender.com/schema/Ook/2.2/OokPrey.xsd">
<Dialog>
<Class>32770</Class>
<Cookie>1309516</Cookie>
<Caption>
<Text>Microsoft Office Outlook</Text>
</Caption>
<Module Optional="false">
<Name>outlook.exe</Name>
</Module>
</Dialog>
<Dialog>
<Class>32770</Class>
<Cookie>1308364</Cookie>
<Caption>
<Text>Microsoft Office Outlook</Text>
</Caption>
<Module Optional="false">
<Name>outlook.exe</Name>
</Module>
</Dialog>
<Dialog>
<Class>32770</Class>
<Cookie>1307212</Cookie>
<Caption>
<Text>Microsoft Office Outlook</Text>
</Caption>
<Module Optional="false">
<Name>outlook.exe</Name>
</Module>
</Dialog>
</OokPrey>
The format is pretty simple:
Ook takes a very simple approach to finding and dismissing dialogs: if it can find a window that matches the characteristics defined in the config file, it simply posts a WM_SYSCOMMAND / SC_CLOSE and a WM_CLOSE message to that window's message queue.
Copyright (c) 2005, Joe Bork All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the Headblender Productions nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The latest version of Ook, as of 22 September 2005, is Ook v2.2.
Most people will only want the Ook binaries, but the full source code is also available. (Both are subject to the terms of the License.)
I develop Ook only in my spare time, and I hope that you find it useful.
If you have any questions, comments, or other concerns about Ook, you're more than welcome to email me. I can't promise that I will get back to you immediately, but I will do my best.
Ook is free! Enjoy, or don't.