ScriptSpot

Forum topic · General Scripting

Multiple UI windows

By AutonomyTD · 2012-04-23

Description

Ok, so this is going to be a no brainer, but I have temporarily lost my hard drive with my maxscript info on it and need to be reminded of the syntax. I have made a rollout and buttons that do shiny things, but cannot remember the best method for checking if the ui window exists in the scene. I need to be able to remove the old one before the new one gets made.

Its monday, so my addled brain (full of alcohol and M&M`s) needs a gentle prod.

Comments (2)

Yippee!!

AutonomyTD · 2012-04-23

SuhWeeeeet!!! Thankyou very much.

Solution

barigazy · 2012-04-23

use globabal for rollout and destroydialog function.
Example:
global TestRoll
try(destroydialog TestRoll) catch()
rollout TestRoll "TestScript" width:208 height:20
(
-------------------------------------------
)
createDialog TestRoll style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)