Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Press ENTER to exit

Status
Not open for further replies.

JamezBrown

IS-IT--Management
Jul 15, 2005
4
CA
I am running a rexx script from a batch file that I eventually want to make run automatically. When the REXX script runs it completes with a message saying "Press ENTER to exit...", I cannot have this in if I plan on having this batch file run automatically. Does anyone know how to get the script to stop prompting for an ENTER key press?
 

You could make it smarter.
Code:
sw.batch     = sysvar("SYSENV")  = "BACK"
will make sw.batch '1' when running in the background, or '0' in the foreground.

Armed with that, the running code can determine whether or not it may prompt (for anything).

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
You say make it smarter by adding that line so the rexx script will run in the background, where would I add that line? In the script or is there a configuration file I need to edit?
 
Wow... that question marks you as a 'naive user'. How much REXX experience do you have? Is this a homework assignment?


Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
I am in fact a beginner a REXX. I had asked a batch web site if they could point me in the right direction to comparing two files and outputting the differences to a file using a .bat file. The web site said he had already made a script using Rexx that does exactly what I am looking for.

I installed Rexx and got the script working somewhat the way i wanted, the only thing now is getting it to stop displaying the "Press ENTER to exit..." message so I can automate it.

Thanks
 

The message "Press ENTER to exit" is not a standard REXX message(**). I am pretty sure it is issued by logic within the REXX code. If that's so, your only option is to modify the code to -not- issue the message whenever you're running in background, that is: when sw.batch is 'on' in the example above.

(**) kind of like clicking "Start" to shut down Windoze, huh?


Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Hmmm... I don't see anyplace in the code where it issues "Press ENTER to exit", so I don't know where that message might be coming from; possibly something in Windows itself? I'm not at all familiar with Windoze; I'm a mainframer myself. Good luck.

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
there is a /p switch in regina.exe that causes the rexx program to pause "Press ENTER to continue ..." before the window closes. This is very useful to see the console output if you double-click to run the script from windows.

from the command line you could enter:
regina.exe MyScript.rexx

-or- as a permanent solution. Modify the the open parameters (tools->options->file types) from:
"c:\Regina\regina.exe" -p "%1" %*
to:
"c:\Regina\regina.exe" "%1" %*

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top