Shoutbox

# key and = key - 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: # key and = key (/showthread.php?tid=65281)

# key and = key by Jimbo on 08-23-2006 at 12:43 PM

is it possible to create a script so that whenever i push the "#" key, it sends a message like eg. "lol" to whatever convo is up.
or when i push the "=" key, it sends "hi"

thanks

134jimbodude


RE: # key and = key by CookieRevised on 08-23-2006 at 12:50 PM

Yes, it's possible...

but to make it, some additional info is needed:

When you press the keys, do you want the "lol" and "hi" text to appear in de text in the typing area (so you still need to press enter to send the message you were typing; thus this is just like inserting emoticons)?

Or do you want the message "lol" and "hi" to be send strait away (thus without changing the possible existing text in the typing area; thus much like a hotkey)? And in this case, do you want these "lol" and "hi" messages to be send to only the currently active convo, or to all open convos?


RE: # key and = key by Jimbo on 08-23-2006 at 12:52 PM

i want it to be sent sraight away if possible please


RE: # key and = key by CookieRevised on 08-23-2006 at 12:58 PM

In that case, do you want these "lol" and "hi" messages to be send to only the currently active convo, or to all open convos?


PS: I can't make the script atm as I don't have Plus! here at work, but with the info provided I'm sure somebody will make it (and if not, I'll provide the script tonight).


RE: # key and = key by Jimbo on 08-23-2006 at 12:59 PM

only the current active convo please

also can you make the messages "hi" and "lol" variables so i can change them please

thanks


RE: # key and = key by Huhu_Manix on 08-23-2006 at 02:59 PM

Like this :

code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
    Message = Message.replace(/#/gi, "lol");
    Message= Message.replace(/=/gi, "hi");
    return Message;
}

?
RE: # key and = key by Jimbo on 08-23-2006 at 03:01 PM

erm..

i want it so when i push the "#" i dont have to push enter.

it justs sends "lol" to the active open convo


RE: # key and = key by Eljay on 08-23-2006 at 03:10 PM

code:
function OnEvent_ChatWndEditKeyDown(ChatWnd, KeyCode){
  switch(KeyCode){
    case 187:
      ChatWnd.SendMessage("hi");
      return true;
    case 222:
      ChatWnd.SendMessage("lol");
      return true;
  }
}

RE: # key and = key by Jimbo on 08-23-2006 at 03:14 PM

kool thanks

wot do the case 187 and the case 222 do?

r they the "#" and the "="?

i want to know this so i can add more to the script

thanks




RE: # key and = key by Huhu_Manix on 08-23-2006 at 03:37 PM

But for the # you need the ALT GR... ^o)

Maybe it's different with QWERTY.


RE: # key and = key by Felu on 08-23-2006 at 03:42 PM

quote:
Originally posted by 134jimbodude
kool thanks

wot do the case 187 and the case 222 do?

r they the "#" and the "="?

i want to know this so i can add more to the script

thanks
http://javascript.js-x.com/key_codes/ Almost All the KeyCodes Appear to be here :p.

   
quote:
Originally posted by Eljay
code:
function OnEvent_ChatWndEditKeyDown(ChatWnd, KeyCode){
    switch(KeyCode){
    case 187:
    ChatWnd.SendMessage("hi");
    return true;
    case 222:
    ChatWnd.SendMessage("lol");
    return true;
    }
    }

Thanks. It maybe helpful to me some day :tongue:.
RE: # key and = key by saralk on 08-23-2006 at 03:44 PM

yes it is ############ see ma, no alt!!11

http://www.js-examples.com/page/tutorials__key_codes.html contains a list of key codes if you want to code your own.


RE: # key and = key by Jimbo on 08-23-2006 at 03:56 PM

thanks everyone


RE: # key and = key by CookieRevised on 08-23-2006 at 08:42 PM

quote:
Originally posted by Huhu_Manix
Like this :

code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
    Message = Message.replace(/#/gi, "lol");
    Message= Message.replace(/=/gi, "hi");
    return Message;
}

?
I especially took the time and asked the questions I asked so people would exactly know what he wanted... please read posts... :dodgy:

quote:
Originally posted by Huhu_Manix
But for the # you need the ALT GR... ^o)

Maybe it's different with QWERTY.
Keycodes, like ascii codes, are always the same. Scancodes depend on keyboard layout.

Ascii codes define the character value (eg: on each and every keyboard you use "A" will always have ascii code 65).

Keycodes define the key value (eg: ctrl is a key, but isn't a character, on each and every keyboard you use the ctrl key will always produce the same keycode).

Scancodes define the position of the key on the keyboard (eg: on every keyboard the second key from the second row will always have the same scancode, but the ascii and keycode for that key can be different depending on keyboard layout)
RE: # key and = key by MicroWay on 09-04-2006 at 02:19 PM

Sorry with my ignorance, but why don't you use the Plus!'s Quick Texts function...
You can put the "#" to be changed for "lol" for example...

:S


RE: # key and = key by markee on 09-04-2006 at 02:22 PM

because this would mean typing it in and sending the message rather than having what is known as a hot-key which is done on the key being pressed


RE: # key and = key by Felu on 09-04-2006 at 02:23 PM

quote:
Originally posted by MicroWay
Sorry with my ignorance, but why don't you use the Plus!'s Quick Texts function...
You can put the "#" to be changed for "lol" for example...

[Image: msn_confused.gif]
But that is not what is requested... He just want key "#" key is pressed some message it sent. Kinda quick keys instead of quick texts [Image: msn_wink.gif].
RE: # key and = key by Huhu_Manix on 09-04-2006 at 07:03 PM

CookieRevised > For my code, he said "or when i push the "=" key, it sends "hi"", i gave only the code for the sent message. :)

And for le key code, thank i didn't know that.


RE: # key and = key by CookieRevised on 09-04-2006 at 07:18 PM

quote:
Originally posted by Huhu_Manix
CookieRevised > For my code, he said "or when i push the "=" key, it sends "hi"", i gave only the code for the sent message. :)
Yep, hence why that was not what has been requested... He requested the behaviour of an hotkey, not replacing letters in a message which is send by pressing the send button or pressing enter.

quote:
Originally posted by Huhu_Manix
And for le key code, thank i didn't know that.
you're welcome ;)

RE: # key and = key by MicroWay on 09-06-2006 at 07:10 PM

Sorry, markee and -!Felu!-
:S

I was thinking other thing, not the Key...