Hello Folks,
I'm trying to use the RegisterHotKey function, however.. I'm stuck. What I want is to let my script react on two hotkeys (Alt+Q and Alt+W). Can anyone help me a bit with it? This is what I got so far, but I don't know what to do next:
js code:
function OnEvent_Initialize(MessengerStart)
{
if(Messenger.MyStatus !== STATUS_UNKNOWN)
{
OnEvent_SigninReady(Messenger.MyEmail);
}
}
function OnEvent_Uninitialize(MessengerExit)
{
}
function OnEvent_SigninReady(Email)
{
_hotkey = MsgPlus.CreateWnd('Hotkey.xml', 'WndHotkey', 2);
_hotkey.RegisterMessageNotification(WM_HOTKEY, true);
// Interop.Call('user32', "RegisterHotKey", _hotkey.Handle, <- Stuck from here
}
function lobyte(w) { return w & 0xff; }
function hibyte(w) { return w >> 8; }
This is my
Hotkey.xml
xml code:
<?xml version="1.0" encoding="UTF-16"?>
<Interfaces xmlns="urn:msgplus:interface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:msgplus:interface PlusInterface.xsd" Name="Message Notifier">
<Window Id="WndHotkey" Version="1">
<Attributes>
<ShowInTaskbar>False</ShowInTaskbar>
</Attributes>
<DialogTmpl/>
<Position Width="0" Height="0" />
</Window>
</Interfaces>
So what do I have to put as parameters for the Call() function, and how can I make this script execute two different functions when the hotkeys are being pressed?
Thanks in advance!