What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Release] Enhanced PSM (Version 2.1)

[Release] Enhanced PSM (Version 2.1)
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: [Release] Enhanced PSM (Version 1.0)
The thing is that the '+' operator can be used for both numbers as strings. And because it's more common to add a number in a string than to add a string to a number, JScript converts the number to a string and then combines the two strings.

A good workaround (and probably the easiest) would be:
code:
if(ControlId=="arrow_left2"){
nudge=10; //just so you know the value
current = 1*ConfigWnd.GetControlText("txt_width");
ConfigWnd.SetControlText("txt_width",current+nudge);
OnConfigEvent_CtrlClicked("", "btn_apply");
}
This will first try to multiply the text by 1. Since the '*' operator can only be used on numbers, JScript converts the string to a number and then saves the value. Then, on the next line, you have an expression with 2 numbers, and that will result in adding those 2 numbers. ;)

However, the previously suggested methods will work too, but in my opinion (and some other script developers' opinions too) this method is the easiest you can find. If you think some other method is better, you're free to use the method of your choice, it's up to you. :)

EDIT: Damn, phalanxii beat me once again. :(

This post was edited on 11-18-2006 at 09:39 AM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
11-18-2006 09:38 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Release] Enhanced PSM (Version 2.1) - by Spunky on 10-25-2006 at 06:16 PM
RE: [Release] Enhanced PSM (Version 1.0) - by MoonGoose on 10-25-2006 at 06:42 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 10-25-2006 at 07:24 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Jimbo on 10-25-2006 at 07:31 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 10-25-2006 at 07:32 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Thor on 10-25-2006 at 07:35 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Jimbo on 10-25-2006 at 07:35 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 10-25-2006 at 07:42 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Jimbo on 10-25-2006 at 07:45 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 10-25-2006 at 07:47 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Jimbo on 10-25-2006 at 07:50 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 10-25-2006 at 07:53 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Jimbo on 10-25-2006 at 07:53 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 10-25-2006 at 07:56 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Jimbo on 10-25-2006 at 07:57 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Solar_custom on 10-27-2006 at 09:11 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 10-27-2006 at 10:38 PM
RE: [Release] Enhanced PSM (Version 1.0) - by elektra on 11-12-2006 at 07:04 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 11-13-2006 at 08:37 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Jimbo on 11-13-2006 at 08:41 PM
RE: [Release] Enhanced PSM (Version 1.0) - by elektra on 11-13-2006 at 08:47 PM
RE: [Release] Enhanced PSM (Version 1.0) - by vaccination on 11-13-2006 at 08:47 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 11-13-2006 at 08:48 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Jimbo on 11-13-2006 at 08:49 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 11-13-2006 at 08:52 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Jimbo on 11-13-2006 at 08:53 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 11-13-2006 at 09:00 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 11-13-2006 at 09:36 PM
RE: [Release] Enhanced PSM (Version 1.0) - by elektra on 11-13-2006 at 09:57 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Jimbo on 11-14-2006 at 07:52 AM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 11-14-2006 at 11:48 AM
RE: [Release] Enhanced PSM (Version 1.0) - by Jimbo on 11-14-2006 at 03:26 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Psychotic-Retard on 11-14-2006 at 05:18 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 11-14-2006 at 05:35 PM
RE: [Release] Enhanced PSM (Version 1.0) - by duck! on 11-14-2006 at 06:33 PM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 11-18-2006 at 02:25 AM
RE: [Release] Enhanced PSM (Version 1.0) - by Plan-1130 on 11-18-2006 at 07:41 AM
RE: RE: [Release] Enhanced PSM (Version 1.0) - by phalanxii on 11-18-2006 at 09:37 AM
RE: [Release] Enhanced PSM (Version 1.0) - by Matti on 11-18-2006 at 09:38 AM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 11-18-2006 at 07:04 PM
RE: [Release] Enhanced PSM (Version 1.0) - by elektra on 11-19-2006 at 10:44 AM
RE: [Release] Enhanced PSM (Version 1.0) - by Spunky on 11-19-2006 at 02:04 PM
RE: [Release] Enhanced PSM (Version 2.1) - by elektra on 11-19-2006 at 03:49 PM


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