hi I have been trying to run a simple scriptjob so that when maya
closes, the dialog box opens.

I can run it in mel but doing in python is different.
please help.



import maya.cmds as mc
############################################
def mnBox():
    mc.confirmDialog( title='Confirm', message='Are you sure?', button=
['Yes','No'], defaultButton='Yes', cancelButton='No',
dismissString='No' )

mc.scriptJob(event=["quitApplication",mnBox()])
##############################################

but i realised that mnBox() within the scriptJob line runs the script
so i tried :
##############################################
import maya.cmds as mc
def mnBox():
    mc.confirmDialog( title='Confirm', message='Are you sure?', button=
['Yes','No'], defaultButton='Yes', cancelButton='No',
dismissString='No' )

mngBox1=mnBox

mc.scriptJob(event=["quitApplication",mngBox1])
##############################################
but it also fails. anyone knows?
please help.
thanks in advance

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to