this was an example with GWBASIC.exe ( which no more works with WIN10 64-bit )
start DOS and then GWBASIC.exe , load xy.bas , run xy.bas, list xy.bas, exit
( can run this script , see DOS for 7 seconds )
Code: Select all
;-- start GWBASIC
;-- start DOS with big black screen , but GWBASIC allows only width=80 lines=25
#warn
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;----------------------------
PR=c:\gwbasic.exe ;-- here is gwbasic.exe
;----------------------------
SetKeyDelay, 80, 10
wa:=a_screenwidth,ha:=a_screenheight,W:=(wa*50)/100,H:=(ha*92)/100
e4x=
(Ltrim join&
@echo off
echo date=
date /t
echo time=
time /t
)
title2=DOS_TEST
run, %comspec% /T:0A /k "title %title2%&mode con lines=4000 cols=120&%e4x%,,,pid2
WinWait, ahk_pid %pid2%
WinMove, ahk_pid %pid2%, ,1,1,%w%,%h% ;- move DOS window to the defined position
WinWaitactive, ahk_pid %pid2%
SendInput {text}ver`n
sleep,1000
controlsend,ahk_parent,{text}cd\`n,ahk_pid %pid2%
ifexist,%pr%
{
sleep,500
ControlSend,ahk_parent,{text}gwbasic`r,ahk_pid %PID2% ;-- run GWBASIC
sleep,500
ControlSend,ahk_parent,{text}Load "Sunset"`r,ahk_pid %PID2% ;-- a GWBASIC command opens 'Sunset.bas'
sleep,500
ControlSend,ahk_parent,{text}run`r,ahk_pid %PID2% ;- run loaded GWBASIC program
sleep,5000
ControlSend,ahk_parent,{text}list`r,ahk_pid %PID2% ;- list GWBASIC script
sleep,5000 ;-- wait 5 seconds
ControlSend,ahk_parent,{text}system`r,ahk_pid %PID2% ;-- quit GWBASIC
}
ControlSend,ahk_parent,{text}@echo Quit this DOS in 6 seconds`r,ahk_pid %PID2%
sleep,6000
ControlSend,ahk_parent,{text}exit`r,ahk_pid %PID2% ;-- quit DOS after 6 seconds
return
https://github.blog/2021-04-15-work-with-github-actions-in-your-terminal-with-github-cli/