Ook

version 2.2

Written by Joe Bork // joe@headblender.com // http://headblender.com/joe/


Contents

  1. Introduction
  2. Requirements
  3. Installation
  4. Using Ook
  5. Advanced
  6. License
  7. Download
  8. Support
  9. Cost

Introduction

If you use Microsoft Outlook's support for IMAP, you've probably seen this error dialog before:

Outlook IMAP error dialog

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.

What Ook Does

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.

What Ook Does Not Do

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.)

Requirements

Ook has the following system requirements:

  • Outlook 2003

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.

  • .NET Framework Version 1.1

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

Installation

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.

Using Ook

Ook is very simple to use. When you launch Ook, you will see this window appear:

normal Ook view

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.)

Details View

You can access the Details view by pressing the "Details" button. This will reveal some additional information:

Ook details interface

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.

Notification Icon

Ook will also place its icon in the System Notification area of the Taskbar (located near the clock). The Ook icon looks like this:

Ook icon

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:

  • Show: This will restore the normal Ook window, and is the same as double-clicking the icon.
  • Check Now: this will have Ook look for Outlook IMAP error dialogs immediately, and is the same as clicking the "Check Now" button.
  • Exit: This will close Ook.

That's about it.

Advanced

Ook uses an XML configuration file to tell it what kinds of dialogs to look for each time it polls.

Ook config file

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.

Config file format

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:

  1. if the Class is a valid integer, it will be intrepreted as a window class atom, otherwise it will be interpreted
    as a string classname. (string classnames support simple wildcards '?' and '*' which work like you would expect)
  2. the Caption and/or Module elements can be omitted
  3. the Optional attribute on the Caption element indicates whether the supplied caption is optional or not; if True, Ook will look for a window with matching
    class and caption first, and then look for just a matching atom and cookie second. if False, Ook will only look for dialogs with matching atom, cookie, and caption.
  4. the Optional attribute on the Module element has a simlar meaning, but it determines whether the name of; the executable that owns the found window needs to be
    matched or not. Matching is done using a simple case-insensitive substring search for the Name in the window's owning module executable pathname.
  5. both the Optional attributes default to True.
  6. if there are multiple windows which meet the Prey critera, only the first window found will be closed each time the ook searches for windows.

How Ook closes windows

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.

License

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.

Download

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.)

Support

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.

Cost

Ook is free! Enjoy, or don't.