Actions in Miranda
Today I would like to introduce to you the new way to achieve fast access to everyday actions you do in MIM (e.g. copy ID of contacts, insert some predefined text or clipboard content into message input area, read/write any key value in DB, call some services, etc.).
My idea was to have possibility to create “actions”, consisting of one or more subactions. Subactions should run in sequence and be able to exchange parameters between each other.
Once I told this idea to Awkward, creator of famous WaTrack and couple of other useful plugins for MIM. He was impressed of that, and, after some brainstorming, said, that his HotKeys plugin is already able to do similar things. So after some discussions ActMan (Actions Manager) was created. Actually it is a further development of his HotKeys plugin, but slightly reorganized in options, and much more powerful – now it can read/write to/from DB, call MIM services with virtually all types of input parameters, check conditions (IF operator), do simple loops, start applications with calculated parameters, call other actions, open message window for predefined contact, etc.
But Awkward removed configuration of hotkeys from ActMan – we decided that his new plugin will just create actions (it means that it cannot call actions created, so it is a service plugin).
For testing of ActMan I created simple tester plugin, UseActions. Then I extended it, and then extended again. And again… So now UseActions is plugin that make use the power of ActMan. It get list of all actions from ActMan, and makes possibility to call these actions – with menus, toolbar buttons, hotkeys, etc.
Current version of UseActions can call actions via creating of:
- TopToolBar and Clist_modern toolbar buttons
- Menu items (MainMenu, ContactMenu and TrayMeny currently implemented, with naming logic and show/hide logic through variables, root popups in testing phase)
- Core hotkeys
ToolBar buttons and Menuitems get icons, that you can change in icolib (one icon per action). Additional icons for root popups are also configurable in icolib.
Actual version of ActMan you always can get here http://awkward.mirandaim.ru/
Latest version of UseActions plugin I normally upload here http://vasilich.org/mim/UseActions.rar
It should work for MIM 0.7+.
UseActions plugin can also be compiled in ANSI version, but since ActMan is Unicode only, I didn’t even try to build ANSI configuration of my plugin.
Please, test it and leave your comments.

Plugin looks great, thx
Bug #1: When setting an action as a main menu item, clicking on apply, everything works fine. Deactivating the main menu item, clicking on apply again, activating it and applying again causes the menu item not to work (tested with opening message windows).
Comment by Mineo — 11 June 2008 @ 12:51
Mineo, thanks for report. gonna test it and come back to you. Please, write me on IM to clear details.
Comment by Vasilich — 11 June 2008 @ 13:49
Hi
Is it possible to make an contact menu action with UseActions, which open the window of this contact, insert a predefined message (this point works) and send it.
I have only found the option to open the message window of one predefined contact.
And is it possible to show the contact menu item for this action only for some contacts (something like “if name = xy then show, else not”)?
I hope, you understand, what I mean
Thanks
Meck
Comment by Meck — 12 June 2008 @ 12:00
Meck,
sure it is possible:
1. create 1st subevent: “call service”. type in service name “SRMsg/SendCommand” without quotes, wParam type – parameter, lparam type – number. In lparam field type “0″.
this will bring up the window for the contact the contactmenu from.
2. create 2nd subevent: “insert text”. type any text you need, and put “^a” without quotes at the end of text – this will autosend this text for foreground window, opened in 1st subaction. By the way, press F1 key when configuring “Insert text” and you will see other useful keystrokes.
So that action will open window for contact on which you call contactmenu.
if you want to show it only for several contacts only – then set checkbox “show only if variables return 1″ for that action in contactmenu settings(tab UseActions), and put there something like “?if(?or(?strcmp(?cinfo(%subject%,nick),TestNick1),?strcmp(?cinfo(%subject%,nick),TestNick2)),1,)”. do not forget – you need Variables plugin to get this thing working.
Good luck!
Comment by Vasilich — 13 June 2008 @ 0:21
Thanks, I’ll try it
Comment by Meck — 13 June 2008 @ 11:27