Command Bar | [release] 1.1 - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Command Bar | [release] 1.1 (/showthread.php?tid=92243)
Command Bar | [release] 1.1 by whiz on 09-16-2009 at 07:32 PM
Features
- shows a floating deskbar for Messenger
- allows a variety of commands for basic Messenger and Plus! operations
- it's resizable (thanks to SmokingCookie and Matti )
- built-in command list, contact list and command help guide
- can be shown or hidden using Esc (hide only, if active) or through the script menu
Known Issues
pressing Enter to submit the command doesn't work - you have to click the Ok button (if anyone knows how to solve this, please say - the Ok button is in the parent, but the text box is in the child) - fixed, I think
Screenshot
RE: Command Bar | [release] 1.0 by matty on 09-16-2009 at 07:41 PM
quote: Originally posted by whiz
Known Issues
- pressing Enter to submit the command doesn't work - you have to click the Ok button (if anyone knows how to solve this, please say - the Ok button is in the parent, but the text box is in the child)
Register the WM_KEYUP (Or WM_KEYDOWN; whatever your fancy) message and watch for the VK_RETURN key?
js code: /*
Added to Main Child Window.js
*/
function OnWndCommandBar_CMainEvent_MessageNotification(PlusWnd, Message, wParam, lParam)
{
if (Message == 0x100) // WM_KEYDOWN
{
if ( wParam === 0xD )
{
OnWndCommandBar_ShellEvent_CtrlClicked( WndCommandBar_CMain , 'BtnOk' )
return 1;
}
}
return -1;
}
/*
Added to Command Bar.js
*/
function OnEvent_Initialize(MessengerStart)
{
WndCommandBar_Shell = MsgPlus.CreateWnd("Windows.xml", "WndCommandBar_Shell", 0);
WndCommandBar_CMain = MsgPlus.CreateChildWnd(WndCommandBar_Shell, "Windows.xml", "WndCommandBar_CMain", 12, 2);
WndCommandBar_Shell.RegisterMessageNotification(0x5, true);
>>> WndCommandBar_CMain.RegisterMessageNotification(0x100, true);<<<
IntCurrentChild = 0;
OnWndCommandBar_ShellEvent_MessageNotification(WndCommandBar_Shell, 0x5);
if (MessengerStart || Messenger.MyStatus < 2)
{
Enable(true);
}
}
Also never use the parameter from OnEvent_Initialize. It only describes how the script was started.
Instead make the code change to look something like this:
js code: function OnEvent_Initialize(MessengerStart) {
if (Messenger.MyStatus < STATUS_INVISIBLE) return false;
WndCommandBar_Shell = MsgPlus.CreateWnd("Windows.xml", "WndCommandBar_Shell", 0);
WndCommandBar_CMain = MsgPlus.CreateChildWnd(WndCommandBar_Shell, "Windows.xml", "WndCommandBar_CMain", 12, 2);
WndCommandBar_Shell.RegisterMessageNotification(0x5, true);
WndCommandBar_CMain.RegisterMessageNotification(0x100, true);
IntCurrentChild = 0;
OnWndCommandBar_ShellEvent_MessageNotification(WndCommandBar_Shell, 0x5);
Enable(true);
}
function OnEvent_Signin(Email)
{
OnEvent_Initialize();
}
RE: Command Bar | [release] 1.0 by whiz on 09-16-2009 at 07:48 PM
quote: Originally posted by matty
quote: Originally posted by whiz
Known Issues
- pressing Enter to submit the command doesn't work - you have to click the Ok button (if anyone knows how to solve this, please say - the Ok button is in the parent, but the text box is in the child)
Register the WM_KEYUP (Or WM_KEYDOWN; whatever your fancy) message and watch for the VK_RETURN key?
Actually, I've just tested it again and it seems to be happy with the Enter key pressing the default Ok button... but it wasn't earlier. Can anyone else confirm if pressing Enter works?
EDIT (1): took note of your edit, I'll add that in...
EDIT (2): I have re-uploaded as version 1.1. Done!
|