Force a REXX program to run minimized

[Autolink] Menu

Use the following method to force a REXX program to run in a special way (e.g. minimized, in the background, in a full screen session, ...)

 
/* sample prolog for a REXX program to run minimized                  */
/* (see also Run a REXX program under a specific environment)         */

                    /* turn CTRL-BREAK OFF                            */
  signal off halt

                    /* get the name of this file                      */
  parse source . . thisFile

                    /* get the parameter                              */
  parse arg thisParameter

                    /* check the pass of this file                    */
  pass2Parameter = "$$PASS2$$"

  if word( thisParameter,1 ) <> pass2Parameter then
  do
                    /* this is the first pass: restart the            */
                    /* CMD minimized                                  */
     address "CMD" "start /C /MIN /BG cmd /c " ,
                     thisFile pass2Parameter thisParameter

                    /* and end the program                            */
     exit

  end /* if */

                    /* this is the second pass: cleanup the parameter */
                    /* and continue                                   */
  parse var thisParameter (pass2Parameter) thisParameter

  /* !!! insert your code here !!! */
exit


[Back: Run a REXX program under a specific environment]
[Next: Start a REXX program in PM mode]