Category : Windows 3.X Files
Archive   : WB-40L.ZIP
Filename : DOSPASTE.WB_

Output of file : DOSPASTE.WB_ contained in archive : WB-40L.ZIP

; An Example of pasting data to a DOS window
; We will paste DIR and CHKDSK, PAUSE and EXIT to as DOS window

if !(WinConfig() & 32) then goto NOGO ; Check for 386 enhanced mode

Pause("Please Note:","This WBT file starts a window. Type EXIT to close the window.")

ReturnKey=Strcat(num2char(13)) ; Setup variable with in it.

; Type DIR and then CHKDSK,
; each with a return
CommandToType="DIR %ReturnKey% CHKDSK %ReturnKey%"

ClipPut(CommandToType) ; Stuff command to type into clipbrd
RunIcon(Environment("COMSPEC"),"") ; Get from COMSPEC
; in environment
WinActivate("COMMAND") ; Activate the COMMAND window
SendKey("! TW~") ; Sendkey to set "windowed" mode
; ...not full screen
WinShow("COMMAND") ; Open up the icon
SendKey("! EP") ; SendKey Alt-Space Edit Paste
Exit ; Byebye

:NOGO ; Hmmm not 386 enhanced mode...
Message("Ooops!","Can only paste to DOS apps when in 386 enhanced mode")