AWS Thinkbox Discussion Forums

SubmitC4DToDeadline.py

Hello,

Is it possible to edit the SubmitC4DToDeadline script so that these two popup windows do not appear but to be automatically submitted and confirm?

For the #2, it is rather easy - locate the function submitJob(), and in the end of it, find the gui.MessageDialog() calls:

    if successes + failures == 1:
        gui.MessageDialog( results )
    elif successes + failures > 1:
        gui.MessageDialog( "Submission Results\n\nSuccesses: " + str( successes ) + "\nFailures: " + str( failures ) + "\n\nSee script console for more details" )
    else:
        gui.MessageDialog( "Submission Failed. No takes selected." )
        return False
    
    return True

Change it to something like

    if successes + failures == 1:
        print( results )
    elif successes + failures > 1:
        print( "Submission Results\n\nSuccesses: " + str( successes ) + "\nFailures: " + str( failures ) + "\n\nSee script console for more details" )
    else:
        print( "Submission Failed. No takes selected." )
        return False
    
    return True

This way, you won’t get a modal popup message with the results, but just a print to the console.

If by #1 you mean “do not open the submission dialog at all”, I am not sure how that would work for the user. You could extract all the relevant submission functionality from the script and remove the GUI completely, but then there would be no way to set any options. Please clarify.

1 Like

Thanks a lot, Bobo
It will be helpful.

Privacy | Site terms | Cookie preferences