About this site
ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Comments
Here the
Here the script:
This should fix your issue.
This should fix your issue. Its not a clean fix but i found it useful for occasion like this. I figured you just want the default button to be pressed so i just pulled some code i found online a while back. Couldn't tell you where i got it but i know i saved it. It uses
dialogMonitorOps
anduiAccessor
to pretty interact with UI dialogs that come up. I would love to explain in more detail how it works but I just know it works and haven't really dabbled in it to deeply to have a keen understanding of it but this should fix your issue ATMhere is your new code with it implemented
email: [email protected]
Wow....Although I didn't know
Wow....Although I didn't know how but its working....Thanks a lot!!! I will try to understand the script...!!
Dialog monitor ops is just a
Dialog monitor ops is just a feature in maxscript which allows you to interact with different dialogs that appear.
Here is how it works in your case....Correct me if i'm wrong anyone.
this line of code unregister any dialogMonitorOps with the id:#test. Just good practice to unregister before you register a new one.
The function it self is the action that will happen when the monitor ops realizes that a dialog has popped up. The code
uiaccessor
is used to to interact with the dialog. Since the confirm button is the default button when the dialog shows up i just used theuiaccessor.pressdefaultbutton()
functionFrom here on out you just turn on the dialog ops and make it so it does the work for you. You also register previous function to run if a dialog appears.
At this point you run the script which usually stop because of some form of dialog. In your case it was the line below. I went ahead and commented out the quiet since you do want the dialog to appear.
Once thats done you just turn off the dialog ops and unregister your function again
dialogMonitorOps.enabled = false dialogMonitorOps.unRegisterNotification id:#test
email: [email protected]
You should write a book if
You should write a book if you start to explain the whole process. :)
By the way, great code
bga
i wish i could take credit
i wish i could take credit for it but I can't. I would like to dig a little deeper into it but for now i never had to have more than confirm buttons being pushed.
email: [email protected]
What max version are you
What max version are you running in? I just applied a bitmap on an obj in 2011. then moved the bitmap into a new folder and tried
render()
which gave me the "continue" dialog. Then I triedrender quiet:true
the dialog did not appear. I noticed you spelled "quiet" incorrectly in your post which leads me to believe you have spelled it wrong in your code. It would still run and not throw up an error so check that first.email: [email protected]
Thanks for the reply
Thanks for the reply MKlejnowski.....sorry I spelt it wrong here....but in the script it is correct.....the problem is when I am using my script....some missing texture message comes....if I press "continue"....the rest of the script is running fine.....same thing when I try to do with "quiet:true"....it dosent show any error....but stops the script there!!