What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [split] Script to use Alt+S to send a message and Enter to get newline

[split] Script to use Alt+S to send a message and Enter to get newline
Author: Message:
Joerg
New Member
*


Posts: 1
Joined: Feb 2009
O.P. RE: Enter Vs Ctrl-Enter etc to send a message
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...
02-20-2009 11:31 AM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Enter Vs Ctrl-Enter etc to send a message
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

This post was edited on 02-20-2009 at 02:07 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
02-20-2009 02:06 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Enter Vs Ctrl-Enter etc to send a message
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;
}
02-20-2009 02:17 PM
Profile E-Mail PM Find Quote Report
Applepig
New Member
*


Posts: 2
Joined: Feb 2009
RE: [split] Script to use Alt+S to send a message and Enter to get newline
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?
02-23-2009 09:57 PM
Profile E-Mail PM Find Quote Report
Novox
New Member
*


Posts: 12
Joined: Oct 2006
RE: [split] Script to use Alt+S to send a message and Enter to get newline
You can use CTRL+Enter to get a new line then hit Enter to send message

This post was edited on 02-24-2009 at 08:11 AM by Novox.
02-24-2009 08:10 AM
Profile E-Mail PM Find Quote Report
biestieboy
New Member
*


Posts: 1
Joined: Apr 2009
RE: RE: Enter Vs Ctrl-Enter etc to send a message
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
04-20-2009 11:05 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [split] Script to use Alt+S to send a message and Enter to get newline
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...

This post was edited on 04-20-2009 at 11:43 PM by matty.
04-20-2009 11:36 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On