WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

DOS

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Detecting Full Screen DOS Sessions

Keywords:	 detecting full screen dos sessions

Since you can only send keystrokes to windowed DOS windows, and you can only Run windowed DOS sessions from WinBatch, here's a clever method for detecting full screen DOS sessions: (If you try to run a DOS program that is full-screen from WinBatch, then the screen will flash black.)

 win = "COMMAND"
 WinShow(win)                                          ; try to show it
 If WinState(win) == @ICON Then SendKeysTo(win, "!~")  ; nope, it was fullscrn; send ALT-ENTER to make partial window
 Then WinShow(win)                                     ; but now it's windowed, after the !~
 SendKeysTo(win, "dir~")			       ; now sendkeys will work
Another cute trick is to run all your DOS sessions with a master PIF file, that has all the settings that WinBatch likes. See the file, "The Mother of all PIF Files" elsewhere on this website to see how to set that up.
Article ID:   W12877
Filename:   Detecting Full Screen DOS Sessions.txt
File Created: 2000:08:02:14:54:42
Last Updated: 2000:08:02:14:54:42