PDA

View Full Version : Make Preview manip through UIAccessor problem


ewk1
01-07-2011, 06:34 PM
Hello all,

I am trying to launch Make Preview with desired preferences and press the default button. I got everything working but Max is left in a state where closing or exiting Max 2010 Sp1x64 gives me a "3ds Max application has stopped working" error message. Here is a stripped down version that just opens Make Preview and presses the default button that still leaves max in an unstable state. Just wondering if this is a bug or I am doing something wrong.

Thanks,
Erik

--script starts here
(
fn f_ConfigureCallback=
(
hWND = DialogMonitorOPS.GetWindowHandle()
if ((UIAccessor.GetWindowText hWND) == "Make Preview") then
(
UIAccessor.PressButtonByName hWND "Create"
completeRedraw()
)
return true
)

fn f_myMakePreview T_optionsToCheckArray T_renderOutputPercentage pushCreate:true=
(
DialogMonitorOPS.Enabled = true
DialogMonitorOPS.RegisterNotification f_ConfigureCallback id:#PokeMakePreview2
DialogMonitorOPS.Interactive=false
max preview
DialogMonitorOPS.unRegisterNotification id:#PokeMakePreview2
DialogMonitorOPS.Enabled = false
)
ary=#("Geometry","Shapes")
f_myMakePreview (ary) 35 pushCreate:true
)

lo
01-09-2011, 09:14 PM
any time you turn on dialogmonitorops max will exit with that message, even if dialogmonitorops is disabled at the time you exit.
Could be max version or os version dependent, I'm not sure, I'm getting it with max2009 64-bit.

ewk1
01-10-2011, 04:10 PM
Rotem,

Thanks for the response. That is what I was afraid of. That makes using this method much less desirable for tools that might be used a lot. I am surprised I have not seen mention of this problem in any of the threads where this was used.

Thanks very much,
Erik

lo
01-11-2011, 04:11 PM
if it's any help, you can programmatically add a registry key that disables all 'program has crashed' messages.

ewk1
01-11-2011, 04:50 PM
Rotem,

Thanks for the tip.

Erik

CGTalk Moderation
01-11-2011, 04:50 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.