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.