» Home

  » Plugins

      » Mime

            » Supported Directives

Brass Plugins: Mime

 

Supported Directives

Directives are how you tell Mime what a custom action should do. They're what you configure in the Custom Action Wizard on this page:

 

This page is a list of the directives Mime supports, and how to use them. Directives must be separated by a double percentage sign - %% - and must follow the syntax closely. Think of them as a mini-scripting language.

Until you're confident with creating directives you should use the wizard page combobox and "Add this directive" buttons. They will coach you through each directive, reminding you what the parameters are and how the directive is structured.

 

The directives

Each page contains a comprehensive description and some examples:

You may be wondering how to get the window classes, command ID's and similar information for use with the directives. A window spy utility will provide these. If you have Visual Studio or the Windows Resource Kit installed then Spy++ is the Microsoft tool to do it. If not, WinSpector is a good tool that will do what you need. All examples use WinSpector to walk you through the configuration.

 

Some common "How do I do..." questions

Q. How do I control WinAmp from any application?

Because this is an "anywhere" action, the criteria must be all blank. First get the window class of WinAmp using a window spy tool. I have Winamp 2.93 which for some reason has a window class of "Winamp 1.x". Next find out how to control WinAmp manually - the "X" key is the keyboard shortcut to start MP3 playback, so we'll use that. Finally create the directive that changes the target window to WinAmp and sends the keypress:

[SetTargetWnd(Winamp 1.x,0)]%%x

We don't need to call [RestoreTargetWnd()] because sending the "X" is the only thing we're doing. Calling it doesn't cause a problem though.

 

If you have some suggestions for this "How do I do" page, please let us know on the forum. Thanks!