Notifications
Clear all
[Closed] [BUG] UIAccessor children rollouts not found
Oct 02, 2017 11:18 pm
Neither UIAccessor.GetPopupDialogs() nor UIAccessor.GetChildWindows() do find the children rollouts.
However, UIAccessor.GetParentWindow() does find the parent rollout.
Max 2011 to 2018, Windows 7
What a family mess!
(
try destroydialog ::RO_Grandfather catch()
rollout RO_Grandfather "Grandfather" width:300 height:300
(
)
rollout RO_Father "Father" width:200 height:200
(
)
rollout RO_Son "Son" width:100 height:100
(
)
createdialog RO_Grandfather
createdialog RO_Father parent:RO_Grandfather.hwnd
createdialog RO_Son parent:RO_Father.hwnd
fn GetPopupDialogs =
(
clearlistener()
result = #()
for j in UIAccessor.GetPopupDialogs() do
(
if UIAccessor.GetWindowClassName j == "MAXScriptDialog" do
(
append result j
format "%
" (UIAccessor.GetWindowText j)
children = UIAccessor.GetChildWindows j
for i in children where UIAccessor.GetWindowClassName i == "MAXScriptDialog" do
(
append result j
format " %
" (UIAccessor.GetWindowText i)
)
format "
====================
"
)
)
return result
)
popups = GetPopUpDialogs()
format "Popup Dialogs: %
" popups
parent = UIAccessor.GetParentWindow RO_Father.hwnd
format "RO_Father parent is -> hwnd:% Name:%
" parent (UIAccessor.GetWindowText parent)
parent = UIAccessor.GetParentWindow RO_Son.hwnd
format "RO_Son parent is -> hwnd:% Name:%
" parent (UIAccessor.GetWindowText parent)
)