To whom it concerns,
I want to create a program that opens my program, rdmath.exe and then inputs multiple alphanumeric codes in the format xxxx-xxxx-xxxx-xxxx into rdmath.exe.
After it inputs the code it should send the enter command into the program twice. It also needs to log everything it is doing in log file, such as, RDMATH.TXT or RDMATH.LOG.
I have both QBasic and VBDos to compile the program in. My problem is this, I think (it's has been like 12 years since I programmed in QBasic) I run the rdmath.exe program, like this:
SHELL "RDMATH.EXE"
However that's as far as my knowledge goes with shelling. Not sure how to get it take the random alphanumeric code and place it into the program prompt.
Thanks,
Riley
qBasic or vbDOS shelling and logging question...
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
RDMATH.EXE: Compile first.
RUNME.EXE: Compile and run second.
Place the string data after the EXE file name in the SHELL statement. You should also be able to do that with a BATch file. Numerical string values can be converted back with VAL. Mixed data can be parsed by the called program.
Code: Select all
cmd$ = COMMAND$
PRINT "[" + cmd$ + "]"
Code: Select all
SHELL "RDMATH.EXE 112233"
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
RDMATH.EXE is already written. It requires a 16 Alphanumeric code in the xxxx-xxxx-xxxx-xxxx be inputed into it. I was wanting to know how to program a file that will repeatedly spit into the RDMATH.EXE the codes and log the codes it spits out also in a text file. Thanks for you help and I will still try this.