What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [request] Hotkey /all

Pages: (2): « First [ 1 ] 2 » Last »
[request] Hotkey /all
Author: Message:
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. [request] Hotkey /all
Can someone make a script please that so when i push, for example, f6, or something, it automatically adds "/all" to the begging of all my messages.
I would like use one of the the Fkeys, and when i get my new G15 keyboard, i may want to use a new Gkey.
Many Thanks

This post was edited on 01-09-2007 at 03:30 PM by Jimbo.
01-09-2007 08:05 AM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: [request] Hotkey /all
I think it's actually more effort to reach up the keyboard to the F keys than it is to just type /all... why not just press / and then wait a split second then press enter?
<Eljay> "Problems encountered: shit blew up" :zippy:
01-09-2007 04:02 PM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: [request] Hotkey /all
Well, in fact that's not hard at all and since we know Jimbodude I'll give you a not-tested-but-should-work-if-I-didn't-forgot-anything (=NTBSHIIDFA :P) script:
code:
var Active = false;
//This will toggle the script when you press F6 (keycode 0x75) in a chat window
function OnEvent_ChatWndEditKeydown(ChatWnd, KeyCode, CtrlKeyDown, ShiftKeyDown) {
   if(KeyCode == 0x75 && !CtrlKeyDown && !ShiftKeyDown) {
      Active = !Active;
   }
}
//This will add '/all' in front of a message when the script is active and the message is not a command
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
   if(Active && !/^\/[^\/\s\n\t]+([\/\s\n\t]|$)/.test(Message)) return "/all "+Message;
}

Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
01-09-2007 05:34 PM
Profile E-Mail PM Web Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. RE: [request] Hotkey /all
quote:
Originally posted by Mattike
var Active = false;
//This will toggle the script when you press F6 (keycode 0x75) in a chat window
function OnEvent_ChatWndEditKeydown(ChatWnd, KeyCode, CtrlKeyDown, ShiftKeyDown) {
   if(KeyCode == 0x75 && !CtrlKeyDown && !ShiftKeyDown) {
      Active = !Active;
   }
}
//This will add '/all' in front of a message when the script is active and the message is not a command
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
   if(Active && !/^\/[^\/\s\n\t]+([\/\s\n\t]|$)/.test(Message)) return "/all "+Message;
}
Sorry but that code doesn't work :(
i press f6, then type a message, then it doesn't send  oall chat winodws:(
01-09-2007 07:19 PM
Profile E-Mail PM Find Quote Report
vaccination
Veteran Member
*****

Avatar

Posts: 2513
Reputation: 43
32 / Male / –
Joined: Apr 2005
RE: [request] Hotkey /all
quote:
Originally posted by Jimbodude
and when i get my new G15 keyboard, i may want to use a new Gkey.


Umm, when you get a G15, you won't need a script, just set one of the G keys to be '/all' 8-)
[Image: jumbled.png]
01-09-2007 07:28 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [request] Hotkey /all
F6 is not a detectable key. F6 is a key widely used to switch to the default edit box. For instance if you are using Firefox or Internet Explorer and press F6 it takes you to the address bar. In the contact list it takes you to the contact quick search. In a conversation window it takes you to the edit text box. (Click the chat history then press F6).

If you want to use F5 simply change :
code:
KeyCode == 0x74
01-09-2007 07:37 PM
Profile E-Mail PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. RE: [request] Hotkey /all
quote:
Originally posted by Matty
F6 is not a detectable key. F6 is a key widely used to switch to the default edit box. For instance if you are using Firefox or Internet Explorer and press F6 it takes you to the address bar. In the contact list it takes you to the contact quick search. In a conversation window it takes you to the edit text box. (Click the chat history then press F6).

If you want to use F5 simply change :
code:
KeyCode == 0x74

Thanks, the code sort of works now, but it sends the message about 20 times :(
01-09-2007 07:53 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [request] Hotkey /all
code:
function OnEvent_ChatWndEditKeydown(oChatWnd, nKeyCode, bCtrlKeyDown, bShiftKeyDown) {
    if (nKeyCode == 0x74 && !bCtrlKeyDown && !bShiftKeyDown){
        if (oChatWnd.EditChangeAllowed === true){
            if (oChatWnd.EditText.indexOf('/all ') === -1){
                oChatWnd.EditText = '/all '+oChatWnd.EditText;
            }
        }
    }
}
01-09-2007 08:17 PM
Profile E-Mail PM Find Quote Report
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
32 / Male / Flag
Joined: Jul 2006
O.P. RE: [request] Hotkey /all
quote:
Originally posted by Matty
function OnEvent_ChatWndEditKeydown(oChatWnd, nKeyCode, bCtrlKeyDown, bShiftKeyDown) {
    if (nKeyCode == 0x74 && !bCtrlKeyDown && !bShiftKeyDown){
        if (oChatWnd.EditChangeAllowed === true){
            if (oChatWnd.EditText.indexOf('/all ') === -1){
                oChatWnd.EditText = '/all '+oChatWnd.EditText;
            }
        }
    }
}
Now i get nothing :( Nothing happens :(
That code is now again, sending about 20 messages :(

This post was edited on 01-09-2007 at 08:22 PM by Jimbo.
01-09-2007 08:21 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [request] Hotkey /all
ok your not making any sense. The code is going to add /all to your current message and when you send the message it will send it to everyone. Thats what you anted right?
01-09-2007 09:23 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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