View Full Version : How to detect if a PopupDialog is open?

09 September 2009, 04:04 PM
Hi guys,
is there a way to detect if there's a PopupDialog open? I'm referring to those for Editable Poly objects like Extrude, Bevel, Bridge, and so on. Knowing exactly which Popup is open isn't strictly required.

I need to perform some refreshing in my cache if topology/geometry is changed upon sub object selection changes.

Thank you very much.

- Enrico

09 September 2009, 05:11 AM
I believe you can use this function to detect if the dialog is open: windows.getChildrenHWND

then use this to press a button:

the hard part (i guess) is looking for the correct integer HWND.

I haven't actually used these functions myself but I hope this helps. :)

stumbled upon these today, search for these in the help file:

09 September 2009, 07:49 AM
Thanks Galagast,
I'm going to look into it, seems to be what I need. Just found some of the voodoo magic left by ZeBoxx2 in this thread ( too.

The idea is to make a better subObject selector, that works during preview state started by commands with popup dialog.

- Enrico

09 September 2009, 12:15 PM
Here is the code to check if a particular dialog is open. In the sample the "Extrude Polygons". It returns the handler if found, or undefined if not found.

hwndExtrudePolygons = windows.getChildHWND (windows.getDesktopHWND()) "Extrude Polygons"
format "hwndExtrudePolygons: %n" hwndExtrudePolygons

hwndExtrudePolygons: #(11406358P, 65552P, 5308582P, "#32770", "Extrude Polygons") -- on my machine, if dialog is open
hwndExtrudePolygons: undefined -- if there's not that dialog

- Enrico

CGTalk Moderation
09 September 2009, 12:15 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.