View Full Version : sending a string variable from a button

02 February 2011, 01:57 PM
This can't be a difficult task, How do you send a string variable from a button?


-l "Button"
-c "command(string)";

where offsetCurve is a string value, obv. -c "command("string")"; does not work, but neither does delaring a variable $string and doing -c "command($string)";

Kind Regards,


02 February 2011, 08:52 PM
ditch the brackets when calling from UI in MEL, makes it a little less cluttered. All literal strings and variables have to be catenated in MEL:

button -l "Button" -c ("command "+$variable);although it gets a bit more complicated if your $variable is a string with spaces or other tricky characters in...
button -l "Button" -c ("command \""+$string+"\"");:nathaN

CGTalk Moderation
02 February 2011, 08:52 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.