[Closed] Disable exporting dialogue?
I am using exportFile function with #noPrompt, but the exporting option still pops up when I execute the script. Any ideas on how to disable the exporting dialogue while exporting?
–
exportFile (path_inform.text + “/” + name_input.text + suffix_list[n] + “.SMD”) #noPrompt using:exporterPlugin.classes[17]
Thanks for any feedback.
Which version of MAX are you using? Tried with MAx 2009 x64 here and the noPrompt argument works OK, and I tried several formats:
exportFile @“c: emp est.fbx” #noPrompt
but did you try the SMD exporter ( I presume it’s this one: http://www.wunderboy.org/sourceapps.php#max9_smd )?
I’m guessing the export plugin itself has to respect the #noPrompt flag somehow.
just tested… does look like the SMD exporter ignores that flag… it also goes crash-happy when I try to automate closing the things (there’s two-three dialogs that end up popping up here… export settings, a progress window and – if unlucky – an error dialog)…
dialogMonitorOps.unregisterNotification id:#test
fn checkDialog = (
local hwnd = dialogMonitorOps.getWindowHandle()
local dialogTitle = uiAccessor.getWindowText hwnd
if (hwnd != 0) do (
format "[%]
" dialogTitle
if (dialogTitle == "3DS Max 9/2008 Source SMD File Exporter") then (
UIAccessor.pressButtonByName hwnd "OK"
dialogMonitorOps.unRegisterNotification id:#test
dialogMonitorOps.enabled = false
)
)
true
)
dialogMonitorOps.registerNotification checkDialog id:#test
dialogMonitorOps.enabled = true
exportFile "c: est.smd"
-- ka-boom.
So unless that doesn’t crash for you – not too sure where to go from there… other than poking at the author
Thanks for your reply.
Yes, I am using SMD Exporter for Max 2009. My script is working properly for some of exporters without option dialogue popping up,but unfortunately not for SMD Exporter.
I can get SMD files exported properly using my script,just don’t want the option dialogue popping up all the time during exporting process. Seems like #noPrompt is not working here.
Unfortunately,it does crash on my site. Anyway,thanks Richard for your input.
well, it not crashing would be a good thing. However, since you’re using 2009, you’ll have to change the dialogTitle being checked for.
add a “print dialogTitle” statement to that script above, do a file > export to SMD, and check what dialogTitle it prints out. Use that in the script.
The idea is that the script will press the appropriate buttons in the dialogs to automatically close it.
Unfortunately, for me, that crashes with the 3ds Max 9/2008 version.