<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic MEL If command syntax? in Maya Programming Forum</title>
    <link>https://forums.autodesk.com/t5/maya-programming-forum/mel-if-command-syntax/m-p/11074193#M2757</link>
    <description>&lt;P&gt;I am trying to use an if command but Maya will keep telling me there is a syntax error. I think I use the wrong symbols around the condition of the if command, but i can't figure out whats the correct one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The script is supposed to check if the Window "rigWindow" exists, and if the answer is yes i want to close it.&lt;/P&gt;&lt;P&gt;The script that does not work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ('window -exists rigWindow')&lt;BR /&gt;(&lt;BR /&gt;deleteUI rigWindow;&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried multiple different things but its frustrating as this seems like&amp;nbsp; a minor mistake. Can someone tell me what the correct syntax for this command would be? Greatly appreciating any help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Mar 2022 15:27:08 GMT</pubDate>
    <dc:creator>peter_baehr97</dc:creator>
    <dc:date>2022-03-31T15:27:08Z</dc:date>
    <item>
      <title>MEL If command syntax?</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/mel-if-command-syntax/m-p/11074193#M2757</link>
      <description>&lt;P&gt;I am trying to use an if command but Maya will keep telling me there is a syntax error. I think I use the wrong symbols around the condition of the if command, but i can't figure out whats the correct one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The script is supposed to check if the Window "rigWindow" exists, and if the answer is yes i want to close it.&lt;/P&gt;&lt;P&gt;The script that does not work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ('window -exists rigWindow')&lt;BR /&gt;(&lt;BR /&gt;deleteUI rigWindow;&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried multiple different things but its frustrating as this seems like&amp;nbsp; a minor mistake. Can someone tell me what the correct syntax for this command would be? Greatly appreciating any help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 15:27:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/mel-if-command-syntax/m-p/11074193#M2757</guid>
      <dc:creator>peter_baehr97</dc:creator>
      <dc:date>2022-03-31T15:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: MEL If command syntax?</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/mel-if-command-syntax/m-p/11074221#M2758</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to enclose the window command in backticks (`) not single quotes. (')&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 15:38:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/mel-if-command-syntax/m-p/11074221#M2758</guid>
      <dc:creator>brentmc</dc:creator>
      <dc:date>2022-03-31T15:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: MEL If command syntax?</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/mel-if-command-syntax/m-p/11074232#M2759</link>
      <description>&lt;P&gt;Thanks for the Reply! Its working now. I also exchanged the normal brackets with {}.&lt;/P&gt;&lt;P&gt;For anyone who has the same problem this is what the correctly working script looks like:&lt;/P&gt;&lt;P&gt;if ( `window -exists rigWindow` )&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; deleteUI rigWindow;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 15:42:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/mel-if-command-syntax/m-p/11074232#M2759</guid>
      <dc:creator>peter_baehr97</dc:creator>
      <dc:date>2022-03-31T15:42:40Z</dc:date>
    </item>
  </channel>
</rss>

