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 workAnother 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: W12877Filename: Detecting Full Screen DOS Sessions.txt