I am working with DosBox emulator in my university. We build .asm files with MASM. I am extremely tired of having to build my .asm file every time with masm, then pressing enter 4 times, then entering link .obj, then enter 4 times. Then running the actual .exe. I wanted to automate this, and after searching for a while, I understand I need to make a batch file. It currently looks like this
@echo off
set arg1=%1
masm %arg1%.asm
%SendKeys% ("echo off{ENTER}")
%SendKeys% "echo off{ENTER}"
%SendKeys% "echo off{ENTER}"
%SendKeys% "echo off{ENTER}"
link %arg1%.obj
%SendKeys% "echo off{ENTER}"
%SendKeys% "echo off{ENTER}"
%SendKeys% "echo off{ENTER}"
%SendKeys% "echo off{ENTER}"
%arg1%.exe
%SendKeys% "echo off{ENTER}"
The SendKeys part doesn't work. When I searched online I was way overwhelmed by what I've found. I just want a simple way (if there is one) to simulate the four enter key pressed I have to manually do every time.
You can place a semicolon ; on the end of masm.exe and link.exe command lines to make the programs use the default file names for the prompts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With