  | | | toggle key ..... | toggle key ..... 2004-07-05 - By ozu's mailbot
Back <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> or if you want to use the NOT operator, which will make the code easier to read.<br> <br> <tt>currFlag = GetValue ("Views.ViewD.TopCamera.camdisp.statsel")<br> </tt><tt>SetValue "*.camdisp.statsel" , NOT currFlag </tt><tt><br> </tt> <tt>SetValue "*.camdisp.statsel" , </tt><tt>NOT</tt><tt> currFlag</tt><tt><br> </tt> <tt>SetValue "*.camdisp.intsel" , </tt><tt>NOT</tt><tt> currFlag</tt><tt><br> </tt> <tt>SetValue "*.camdisp.playbacksel" , </tt ><tt>NOT</tt><tt> currFlag</tt><tt><br> </tt> <tt>SetValue "*.camdisp.statunselnear" , </tt><tt >NOT</tt><tt> currFlag</tt><tt><br> </tt> <tt>SetValue "*.camdisp.intunselnear" , </tt ><tt>NOT</tt><tt> currFlag</tt><tt><br> </tt> <tt>SetValue "*.camdisp.playbackunselnear", </tt><tt>NOT</tt><tt> currFlag</tt><tt></tt><br> <tt><br> </tt>OO<br> <br> Rafe Sacks wrote:<br> <blockquote cite="mid40E9E886.8030005@(protected)" type="cite"> <meta content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1" http-equiv="Content-Type"> <title></title> <small><font color="#000099" face="Helvetica, Arial, sans-serif">Boolean values can always be switched using 1 - value. For example....</font></small> <br> <br> <blockquote> <p class="MsoNormal" style=""><span class="SpellE"><span class="GramE"><font color="black" size="2"><span style="font-size: 10pt; font-family: Courier; color: windowtext;"></span>< /font></span></span><font color="black" size="2"><span style="font-size: 10pt; font-family: Courier; color: windowtext;"></span>< /font><tt>oDisp = GetValue ("Views.ViewD.TopCamera.camdisp.statsel")<br> <br> bSwitch = 1 - oDisp;<br> <br> SetValue "*.camdisp.statsel" , </tt ><tt>bSwitch </tt><br> <tt>SetValue "*.camdisp.statsel"   ; , </tt><tt>bSwitch </tt><br> <tt>SetValue "*.camdisp.intsel" , </tt><tt>bSwitch </tt><br> <tt>SetValue "*.camdisp.playbacksel" , </tt><tt >bSwitch </tt><br> <tt>SetValue "*.camdisp.statunselnear" , </tt><tt>bSwitch </tt><br> <tt>SetValue "*.camdisp.intunselnear" , </tt><tt >bSwitch </tt><br> <tt>SetValue "*.camdisp.playbackunselnear", </tt><tt>bSwitch </tt><br> <tt><br> <br> if </tt><tt>bSwitch </tt><tt>then<br> SetDisplayMode "Views.*.*", "shaded"<br> Else<br> SetDisplayMode "Views.*.*", "wireframe"<br> End if</tt><br> </p> </blockquote> <br> <br> <br> <small><font color="#000099" face="Helvetica, Arial, sans-serif">These means alot less double code. It works like this...<br> <br> </font><big><font color="#000099"><tt>true = 1<br> false = 0<br> <br> 1 - 0 = 1<br> 1 - 1 = 0<br> <br> P.S. Been a while since I have used VBS, hope this is right. There are probably better ways to do this.. object model etc, I am just illustrating the boolean point here.<br> <br> <br> <br> </tt></font></big></small> <pre wrap=""><small><b><font face="Century Gothic"><font color="#000066"><font color="#000066"><font color="#c0c0c0">__ ____ ____ _____ __ ____ ____ __</font> </font></font></font></b><font face="Century Gothic"><font color="#000066"><small><small><font color="#666666"><big><font color="#000066"><big><big>R</big></big> <big>A F E </big> <big><big>S</big>< /big> <big>A C K S</big></font></big></font></small></small></font></font>< /small><b><small><font face="Century Gothic"><small><font color="#999999"> </font></small></font></small></b><font color="#999999"><small><font face="Century Gothic"><small>C h a r a c t e r D e p a r t m e n t </small></font></small></font><small><font color="#000066"><big><small><font face="Century Gothic"><small>A n i m a l L o g i c</small></font></small>< /big></font></small></pre> <br> </blockquote> </body> </html> --- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|
 |