Message 1 of 18
MAXScript | DialogMonitorOPS.GetWindowHandle() Issue in 2017
Not applicable
11-11-2016
06:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anyone confirm that "DialogMonitorOPS.GetWindowHandle()" is actually returning a valid window handle anymore in 2017? No matter what I try, even the example in the documentation, it either doesn't return anything or returns "0P". From what I understand, if I run the code below, when I launch the "Customize User Interface" dialog, there should be some information logged to the MAXScript Listener... but there isn't! I'm also experiencing similar issues with "DialogMonitorOPS.GetWindowHandle()" in other third party plugins and scripts.
The code I am using currently for testing is:
DialogMonitorOPS.unRegisterNotification id:#eyeInTheSky
fn dmnotification =
(
WindowHandle = DialogMonitorOPS.GetWindowHandle()
format "Dialog Window Handle: %\n" WindowHandle
format "Dialog Name: %\n" (UIAccessor.GetWindowText WindowHandle)
format "Window Class Name: %\n" (UIAccessor.GetWindowClassName WindowHandle)
format "Window Resource ID: %\n" (UIAccessor.GetWindowResourceID WindowHandle)
format "Is Window: %\n" (UIAccessor.isWindow WindowHandle)
format "Window DLL Filename: %\n" (UIAccessor.GetWindowDllFileName WindowHandle)
format "Window DLL Description: %\n" (UIAccessor.GetWindowDllDescription WindowHandle)
UIAccessor.SetWindowText WindowHandle" All Your Windows Are Belong To Us"
format "=====================\n"
true
)
DialogMonitorOPS.RegisterNotification dmnotification id:#eyeInTheSky
DialogMonitorOPS.Enabled = true
DialogMonitorOPS.ShowNotification()Any help or clarification would be greatly appreciated! Thanks!
