> I'm not sure, but probably a program can distinguish whether it's in
> "interactive mode" or used for batch processing? It seems like this should be 
> possible, but I don't think it is.  I've tried doing something similar 
> (though not quite the same), where I tried to automatically detect whether my 
> program was being run from the command-line or being "called" (via the DOS 
> EXEC function) from another program.  I could never figure out a way to 
> automatically detect this.  The closest I could come was figuring out the 
> name of the "parent" program and compare it to a list of known command-line 
> interpreters (from MS, FreeDOS, 4DOS, etc.).  I abandoned the idea since it 
> was pretty unreliable. If there are some keystrokes you ALWAYS want to "type" 
> at the beginning of a particular program, you should start the program with a 
> batch file and use a "keyboard stuffing" utility (there are several of those 
> available, including my SCANCODE program). However, you should be able to 
> tell whether your input is coming from the keyboard or being redirected from 
> a file (which I believe is what is being meant by "batch processing").  With 
> some of my programs, I do something similar with the output.  These programs 
> have an "automatic pause" feature that stops when the screen gets full 
> (similar to piping the output of the program to MORE).  However, if the 
> program detects that the output has been redirected to something other than 
> STDOUT (the screen), the auto-pause is disabled so the entire output is 
> redirected with no pauses.
____________________________________________________________
Sponsored by 
https://www.newser.com/?utm_source=part&utm_medium=uol&utm_campaign=rss_taglines_more

Suit: McDonald's 'Intentionally' Hurt Black Franchisees
http://thirdpartyoffers.juno.com/TGL3141/5f4e725a866b9725a7d46st04vuc1
Cheater's NYT Wedding Story Gave Away a Little Too Much
http://thirdpartyoffers.juno.com/TGL3141/5f4e725aa9c70725a7d46st04vuc2
Trump Mentions Plane Filled With 'Thugs' in Dark Uniforms
http://thirdpartyoffers.juno.com/TGL3141/5f4e725acdaf4725a7d46st04vuc3
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to