Shoutbox

Script question and 2 msn questions. - 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: Script question and 2 msn questions. (/showthread.php?tid=76232)

Script question and 2 msn questions. by Ashylay on 07-21-2007 at 02:07 PM

Okay so I have got the NameEditor script which I love btw and I was just tinkerin with the script to add some more things into it because I was bored.

I was just wondering though:

1) What is the limit of characters you can have in your MSN Name
2) What is the limit of characters you can have in your PSM
3) Is there a way to limit the amount of charcters enterd into a textbox in a MsgPlus!Live Window


RE: Script question and 2 msn questions. by _Humphreys on 07-21-2007 at 02:10 PM

According to word;

129 characters for MSN Name
129 characters for PSM

This is probably wrong though...


RE: Script question and 2 msn questions. by GNSPS on 07-21-2007 at 02:34 PM

Yes, there is a way to limit the amount of characters to enter in a textbox in a MP!L window, all you have to do is to edit the XML file or the script's code in order for them to don't allow more characters than those specified.


RE: Script question and 2 msn questions. by CookieRevised on 07-21-2007 at 04:58 PM

quote:
Originally posted by GNSPS
Yes, there is a way to limit the amount of characters to enter in a textbox in a MP!L window, all you have to do is to edit the XML file or the script's code in order for them to don't allow more characters than those specified.
IIRC there is no way to specify the maximum amount of characters you can enter in an EditControl directly in the XML; there are no attributes for it.

However, you can specify the maximum amount by sending the EM_SETLIMITTEXT or EM_LIMITTEXT windows message (both are identical) to the control by using the Plus! scripting function: PlusWnd::SendControlMessage.

See Official Plus! Scripting Documentation.

eg:
code:
// create window with id 'Information'
var wndExample = MsgPlus.CreateWnd('interface.xml', 'Information');     
// send windows message EM_LIMITTEXT (constant value 0xC5) to the control with id 'PhoneNumber'
wndExample.SendControlMessage('PhoneNumber', 0xC5 /* EM_LIMITTEXT */, 9 /* maximum allowed characters */, 0 /* not used */)