What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Edit text while typing

Edit text while typing
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Edit text while typing
quote:
Originally posted by #BG
Javascript code:
function OnEvent_ChatWndEditKeyDown(pChatWnd, nKeyCode, bCtrl, bShift)
{
  // Declare a variable to hold the value of the 2 virtual key
  var VK_2 = 0x32;
       
  // Check if the key pressed are Shift and 2
  if (nKeyCode == VK_2 && bShift == true)
  {
    // Validate that we can type
    if (pChatWnd.EditChangeAllowed == true)
    {
      // Gain access to the contact object
      var oContact = new Enumerator(pChatWnd.Contacts).item();
 
      // Validate that the contact is not blocked and that they are on the MSN network
      if (oContact.Blocked == false && oContact.Network == NETWORK_MSN)
      {
          ChatWnd.EditText = ""; // Now how should I use it?      }
    }
  }
}


You declared the function pChatWnd so as such any references need to be pChatWnd not ChatWnd as I have highlighted in your code.
03-14-2011 02:12 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Edit text while typing - by #BG on 03-13-2011 at 06:59 PM
RE: Edit text while typing - by matty on 03-13-2011 at 07:14 PM
RE: Edit text while typing - by #BG on 03-13-2011 at 07:45 PM
RE: Edit text while typing - by Matti on 03-13-2011 at 10:38 PM
Define ChatWnd - by #BG on 03-14-2011 at 01:21 AM
RE: Edit text while typing - by matty on 03-14-2011 at 02:12 AM


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