A quick (and dirty) Script Palette script

 From:  Michael Gibson
5993.19 In reply to 5993.15 
Hi dinos,

> The close button is just the standard moi:DialogClose tag. I'm not sure if this localized
> along with the rest of Moi3D if you are using a different language.

Yup, it is localized and the localization seems to be working fine for me over here...


> I remember looking for a way to close the Dialog window after a command is selected, but
> i couldn't find one. That would eliminate the close button altogether and improve the
> operation of the script.

Buttons or menu items on a flyout will automatically dismiss the flyout when pushed, but that built in default auto closing won't happen if they are on a dialog instead of a flyout menu.

You can add an onclick="" handler to make the dialog close though, you'd want to do the same thing as the button inside of the DialogClose.htm template, which is: onclick="moiWindow.endDialog(0);"

So modifying line #26 of ScriptPalette.htm to be this should do it:

code:
				html += '<moi:MenuItem onclick="moiWindow.endDialog(0);" command="' + cmd + '">' + title + '</moi:MenuItem>';



For some people it might be good to have a separate close button if they are using it repeatedly though...

- Michael