Notifications
Clear all

[Closed] Some Doubts with Registering Scripts

Hello everybody, I was wondering how i can know if a scripts, scripts plugins or dialogo are already opened/registered in order to close/unregister. I would like to use it in two different situation. One of them is, because i want to create a new version of the CommonTools, soy i would like to check if the script is already runing to close it and open my version. I post here a small example how i am trying to do it. And the other one is because, i am trying to do a plugins-script derive from texturemap, so my problem is when i make some changes and i run the script, it gives me an error because a previous instance of the plugins-script is running. So i would like how i can shutdown the actual running plugins-scripts and run the new one without shutting down the 3dsmax.

Thank in advance,
ting

/*
Check if There is a previous version of the script is already opened,
if it is true then it is unregistered and closed
*/

rollout test_rollout “Test”
(
button btn1 “Button” pos:[12,10]
)

cui.UnRegisterDialogbar test_win
DestroyDialog test_win
closeRolloutFloater test_win

test_win = newrolloutfloater “Test” 100 500
addrollout test_rollout test_win
cui.registerdialogbar test_win
cui.dockdialogbar test_win #cui_dock_left