The Dragon King
Advanced: Title Bar Hooking Incompatible Emulators/Games. 
About Mame Hooker Overview:

Using mamehooker to control outputs is great, but sometimes you need an app that can tell you what is currently running, even if Mamehooker doesn't really support the application in question. You can do this as well. You might want to use this to load a marquee on a secondary screen, load a needed auto hot key script for a problem pc game, update a "now playing" web tag, or any number of things. If you need this functionality, you can use the optional "title bar hooking" feature of mamehooker to do so.

For the purposes of this example I'll walk you through how to hook notepad in windows. It's a good example because everyone has it, and much like emulators, the title bar of a notepad window tells you both the application name (notepad) and the file name ("untitled" or what have you). Anyway with mamehooker running and title bar hooking still disabled (It'll interfere with our work) go ahead and open up notepad. Select "configure title bar hooking" from mamehooker's "other emulators" menu and press the "add wizard" button from the dialog box.

You'll be prompted with this:

Basically it's telling you that you'll need to have the emulator in question running in windowed mode to detect it. Click ok and you'll get another warning telling you to click on the emulator. Immediately after clicking "OK" on this second prompt, click the notepad window. You should hear a beep in a second or two and you can minimize notepad. It'll prompt you with info on the window it found. If it's correct click "Yes", otherwise, click "No" and it will let you try again. Be quicker this time!

Next it'll ask you to name the emulator. Basically this will be the name of the folder created in the "ini" folder. (No spaces please.) For our purposes "Notepad" is fine.

Now it'll ask you if it's a stand-alone game or a emulator like so:

Basically is the rom or game name written to the title bar when the emulator is running. Since Notepad gives us the "rom" name of the text file loaded, select multi game emulator.

Now it wants to know the separator between the rom/game part of the title and the emulator name. In our case it's the "-" so you want to select the part of the title with the cursor like so:

Now it'll ask you about which part is the emulator name, and which part is the game/rom name. So answer those two questions like so:


Note that their may still be some garbage in the title, but don't worry, in this next step put any garbage that needs stripped away, like parentheses and brackets, in the text box as shown:

Also note the optional "requires rom lookup" checkbox. If an emulator displays the full game name (Street Fighter II) and you would like to refer to it with it's rom name (sf2) you can use this option. If checked you create a "rom.ini" and place it in the emulator's folder in the ini folder. It's a plain text file with a "game name=rom" syntax like so:

Street Fighter II=sf2
Mortal Kombat 3=mk3

For our purposes we don't need to do this so leave it unchecked.

Now you are done! Since a working notepad entry was already included with mamehooker, you can just exit, but normally you would click the finish button in the wizard. You can give it a try if you like, simply select "enable title bar hooking" from the mamehooker window. When you maximize and click on the notepad window, you'll get a mame start message like so:

It should be noted that when a emulator/game is in windowed mode, the title bar hooker acts a little funny. It'll register a "mame stop" any time you click outside the emulator, and a "mame start" when you return. This won't be an issue when you are running the emulator for real in fullscreen mode though. Now that you've finished this tutorial you will probably want to delete the notepad entry in the title bar configuration box as it isn't useful for anything practical.

Anyway, that's it, enjoy hooking anything!