Toggle Single Marquee script

Toggle Single Marquee script

Anonymous
Not applicable
618 Views
1 Reply
Message 1 of 2

Toggle Single Marquee script

Anonymous
Not applicable

Hello! I've wrote a script that change "Preferences/Selection/Single Marquee select box". And it not working (yes, I'm a newbie in MEL). Help me, please.

 

string $checkSingle = `selectPref -q -singleBoxSelection`;

if ($checkSingle=1) {selectPref -singleBoxSelection false;}
else {selectPref -singleBoxSelection true;}

 

Thanks

0 Likes
Accepted solutions (1)
619 Views
1 Reply
Reply (1)
Message 2 of 2

RFlannery1
Collaborator
Collaborator
Accepted solution

I believe problem is with the line "if ($checkSingle=1)".  It should be using a double equals.  Like so: "if ($checkSingle==1)".

 

A double equal sign is testing for equality.  A single equal sign is assigning the value 1 to your $checkSingle variable.

0 Likes