View Full Version : How to detect if a PopupDialog is open?
SyncViewS 09-28-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
|
|
galagast
09-29-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:
windows.sendMessage
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. :)
edit:
stumbled upon these today, search for these in the help file:
DialogMonitorOPS
UIAccessor
SyncViewS
09-29-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 (http://forums.cgsociety.org/showthread.php?f=98&t=705049) too.
The idea is to make a better subObject selector, that works during preview state started by commands with popup dialog.
- Enrico
SyncViewS
09-29-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
)
Returns:
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-29-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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.