[split] Script to use Alt+S to send a message and Enter to get newline - 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: [split] Script to use Alt+S to send a message and Enter to get newline (/showthread.php?tid=89296)
RE: Enter Vs Ctrl-Enter etc to send a message by Joerg on 02-20-2009 at 11:31 AM
Hi there,
I'm also used to send messages on Alt+S and would like to have a return functin on hitting Enter, instead of sending.
Last mentioned is not too important but I'm often hitting Alt-S and get annoyed that nothing happens
I tried to solve that by wrinting a Script but the OnEvent_ChatWndEditKeyDown does only work for Ctrl, Shift and Non-System Keys. And Non-System Keys are defined as "not a combination with the Alt-Key". *grrrr*
On the other hand that means, that your Ctrl+Enter features can be easiely modified by a script.
Does anyone have a solution to get Alt+S working?
One may be to use an external tool to Set Alt+S to work as Enter.
Or have a new Event Handler that works on Alt...
RE: Enter Vs Ctrl-Enter etc to send a message by Spunky on 02-20-2009 at 02:06 PM
quote: Originally posted by Joerg
Hi there,
I'm also used to send messages on Alt+S and would like to have a return functin on hitting Enter, instead of sending.
Last mentioned is not too important but I'm often hitting Alt-S and get annoyed that nothing happens
I tried to solve that by wrinting a Script but the OnEvent_ChatWndEditKeyDown does only work for Ctrl, Shift and Non-System Keys. And Non-System Keys are defined as "not a combination with the Alt-Key". *grrrr*
On the other hand that means, that your Ctrl+Enter features can be easiely modified by a script.
Does anyone have a solution to get Alt+S working?
One may be to use an external tool to Set Alt+S to work as Enter.
Or have a new Event Handler that works on Alt...
You may be interested in using a global hook to detect key presses. If you look at my StatusKey script, you'll find the code you need (graciously provided by matty). I think it uses ALT-S by default for something
EDIT: Linked to script
RE: Enter Vs Ctrl-Enter etc to send a message by matty on 02-20-2009 at 02:17 PM
js code: function OnEvent_ChatWndEditKeyDown( pChatWnd, vkKey, bCtrl, bShift ) {
if ( vkKey === 0xD /* VK_RETURN */ ) {
if ( bCtrl === true ) {
pChatWnd.SendMessage( pChatWnd.EditText ); // I don't think this property perserves emoticons
return true;
} else {
/*
too lazy to write code to insert a new line at the current character
position and overwrite any highlighted text... DIY
*/
return true;
}
}
return false;
}
RE: [split] Script to use Alt+S to send a message and Enter to get newline by Applepig on 02-23-2009 at 09:57 PM
quote: Originally posted by Spunky
You may be interested in using a global hook to detect key presses. If you look at my StatusKey script, you'll find the code you need (graciously provided by matty). I think it uses ALT-S by default for something
EDIT: Linked to script
I want my alt-s hotkey back, too. However, my script skill is too low to read this script.
Is there any method easier to get alt-s work?
RE: [split] Script to use Alt+S to send a message and Enter to get newline by Novox on 02-24-2009 at 08:10 AM
You can use CTRL+Enter to get a new line then hit Enter to send message
RE: RE: Enter Vs Ctrl-Enter etc to send a message by biestieboy on 04-20-2009 at 11:05 PM
quote: Originally posted by matty
js code: function OnEvent_ChatWndEditKeyDown( pChatWnd, vkKey, bCtrl, bShift ) {
if ( vkKey === 0xD /* VK_RETURN */ ) {
if ( bCtrl === true ) {
pChatWnd.SendMessage( pChatWnd.EditText ); // I don't think this property perserves emoticons
return true;
} else {
/*
too lazy to write code to insert a new line at the current character
position and overwrite any highlighted text... DIY
*/
return true;
}
}
return false;
}
I search for the Key "TAB" & ENTER oder Space
RE: [split] Script to use Alt+S to send a message and Enter to get newline by matty on 04-20-2009 at 11:36 PM
It seems as if the enter key is not processed or when typing unless ctrl or shift are held.
Therefore the above code I wrote won't work...
|