From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: [SUBMIT] auto confirm/submit Form
   Date: Thu, 04 Mar 2010 23:45:20 -0500
Msg# 1926
View Complete Thread (5 articles) | All Threads
Last Next
Stephan Kosinski wrote:
> [posted to rush.general]
> 
> Thank you very much Greg, it works perfectly.
> 
> That will even allows me to generate one file per layer to render.
> 
> One last thing, the "Be very Happy" window is still popping-up, which is 
> really nice :) , but annoying when I have several to close after I 
> launched several forms at a time. Any way to prevent this?

	Ah, that.

	Yes, I recently added the ability to turn that off, which will
	be in the next release. (The new code takes a flexible argument
	list that lets one disable that dialog)

	The code responsible for opening that dialog is in the RushSubmit()
	function in .common.pl, specifically:

----
            open(STARTIRUSH, "|$inputcmd");
            print STARTIRUSH "-----------------\n" .
                             "--- SUBMIT OK ---\n" .
                             "-----------------\n\n" .
                             $msg;
            unless ( close(STARTIRUSH) ) { return(0); } # picked "No Irush"
----

	What I'd suggest as a workaround is putting a conditional around that code
	that checks an environment variable (which you'd set in your application
	to turn that off), ie:

----
            if ( ! defined($ENV{RUSH_NO_SUCCESS_DIALOG}) )  ### ADD THIS LINE
	    {                                               ### ADD THIS LINE
                open(STARTIRUSH, "|$inputcmd");
                print STARTIRUSH "-----------------\n" .
                                 "--- SUBMIT OK ---\n" .
                                 "-----------------\n\n" .
                                 $msg;
                unless ( close(STARTIRUSH) ) { return(0); } # picked "No Irush"
            }                                               ### ADD THIS LINE
----

	..then in your script, just before you invoke the submit script to
	submit the job, set that environment variable RUSH_NO_SUCCESS_DIALOG to 1.
	That will prevent the dialog from opening.

	You can set environment variables from all scripting languages,
	including 'mel', which I think would be with:

		putenv("RUSH_NO_SUCCESS_DIALOG", "1");

	Meanwhile other users invoking the submit script interactively
	will continue to have the normal behavior, because that variable
	would not be set.

	Let me know if that doesn't work.. I'd think it should.

-- 
Greg Ercolano, erco@(email surpressed)
Seriss Corporation
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)

Last Next