// a function to be called when the button gets clicked.<br> proc func() {<br> string $basicFilter = "Maya ASCII (*.ma);; Jpeg (*.jpeg *jpg);";<br> string $result[] = `fileDialog2 -fileFilter $basicFilter -fileMode 2 -dialogStyle 1`;<br> for ( $i = 0; $i < size($result); ++$i) {<br> print($result[$i]);<br> }<br> }<br><br> // create a window<br> window;<br><br> // define the layout of controls added <br> // to the window.<br> columnLayout;<br><br> // create a button<br> button -label "click me" -command "func";<br><br> // show the window we last created<br> showWindow;
// a function to be called when the button gets clicked.<br> proc func() {<br> string $basicFilter = "Maya ASCII (*.ma);; Jpeg (*.jpeg *jpg);";<br> string $result[] = `fileDialog2 -fileFilter $basicFilter -fileMode 2 -dialogStyle 1`;<br> for ( $i = 0; $i < size($result); ++$i) {<br> print($result[$i]);<br> }<br> }<br><br> // create a window<br> window;<br><br> // define the layout of controls added <br> // to the window.<br> columnLayout;<br><br> // create a button<br> button -label "click me" -command "func";<br><br> // show the window we last created<br> showWindow;
Hi thank you so much for your response I figured it out and another person helped me with that But still one small error is there it seems hard for me. Any Idea?
ERROR ( // Error: line 12: Flags must come before objects: -ed )
{ string $sn = `file -q -sn`;
string $cfp = `dirname( $sn )`;
if (`window -exists ScreenCapture`) //closes window if already open
Replies
fileDialog2 -fileFilter "Maya ASCII (*.ma);)" -cap "Browse" -optionsUICreate "MyCustomOptionsUISetup";
ERROR ( // Error: line 12: Flags must come before objects: -ed )