Check if the Listener Window is open

I've tried with UIAccessor but couldn't find a way to check if the Listener Window was open or not. I want to check its status and if it's not open before the execution of the script then upon closing the script it will close it again. I can close the dialog fine with the code below but it's checking if it's open where the problem is.

UIAccessor.CloseDialog (windows.getchildhwnd 0 "MAXScript Listener")[1]

Comments

Comment viewing options

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

.

Cool answer Swordslayer. Thanks a lot!

That IsWindowVisible will come in handy a lot along with many other things that this stuff is capable of.

jahman's picture

.

user32 = (python.import "ctypes").windll.user32


no more c# libs compiled on the fly

Swordslayer's picture

 

iGlobal = (dotNetClass "Autodesk.Max.GlobalInterface").Instance
user32 = (python.import "ctypes").windll.user32
user32.IsWindowVisible iGlobal.TheListenerWindow != 0

Comment viewing options

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