script - close the active shade window?

hi guys please help ..im still a beginner in maxscripting.. search already online but no luck.. im finding a way to "close the active shade window" via maxscript.. im currently working on a simple script to automate the process in opening the vray rt and closing the active shade window when done... or is there any script to "close all the floating windows"?

thanks in advance

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

Or you can use mapped

Or you can use mapped function like this

popDialogs = UIAccessor.GetPopupDialogs()
mapped fn closePopups hwndArr = (UIAccessor.CloseDialog hwndArr)
closePopups popDialogs

barigazy

barigazy's picture

To close all popups just run

To close all popups just run this

popDialogs = UIAccessor.GetPopupDialogs()
for d in popDialogs do UIAccessor.CloseDialog d

barigazy

oncire's picture

big thanks

your code works... now my script is completed... thanks again barigazy for the code

oncire's picture

thanks

thanks for your reply.

i will try

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.