is it ok if i ask a DOSbox-X batch command here?
the commands in there are very limited
SET Spec=ST2.
FOR %%V IN ('TYPE %Spec%') DO SET X=%%V
ECHO %X%
PAUSE
this doesnt work with DOSBox-x
a file ST2. has 2 lines, it goes like this
old ABC
i need a batch that returns a var ABC
2nd line is an empty line
are there batch commands to get the 2nd string ABC?
"old" is the basic compiler's command to load a file ABC
once i exit the basic compiler, i need to send the file "ABC" to a different directory to compile and make an ABC.EXE there
i hope to do it in one batch file
i can not just add a string "ABC" to a batch, it must be read, because i have 10s of "ST2."s from many directories and they are constantly changing, it depends on what file i am working, ST2. is auto-produced by the basic compiler's macro.
ok if i ask a DOSbox-X batch, need to read 2nd string
Moderator: DosItHelp
Re: ok if i ask a DOSbox-X batch, need to read 2nd string
Hi nnnmmm,
Build one config file which contains only the "ABC".
Then you can build the spec file before you start the compiler by
I suppose not, but you could solve it with a trick.
Build one config file which contains only the "ABC".
Then you can build the spec file before you start the compiler by
Code: Select all
echo old > ST2
type config.cfg >> ST2
Re: ok if i ask a DOSbox-X batch, need to read 2nd string
echo old > ST2
type config.cfg >> ST2
config file which contains only the "ABC"
i dont see how the above can work... and
it got more complicated. it was not just "ABC" and it was ABC.TRU and i need to change to ABC.TRC before i can send, i need a string manipulation later for this if there is one in dosboxx. i may have to look for someone who can write assembler to send errorlevels or something to read bytes from the 5th position to 5 + 8.3 = 16th position of a file.
there is more personal story below you can skip it at this point
*****************************************************************************
a file ST2. has 1 line in dosboxx and xtree in DOS, it looks like below
old ABC.Tru
the basic command code looks like below and it becomes the the DUMBEST binary HARDCODED blind macro(but once data are built, it is SOOOOOO powerful i cant replace it with anything else in the world). it is like DOS v3.3 command.com's edlin plus without display, you can't go back and change
ASK NAME A$
PRINT "old";" ";A$
END
why DUMB? it doesnt replace the macro key, it just adds next to it and the more i add, the more it consumes the real memory, in order to avoid this, i have to rewrite 100s key macros from the start without a mistake for several days with lots of headache. i have done several times back in the day, cant do no more, i'd rather hex-edit the macro file and reengineer and hack and rebuild the macro file if i ever knew how.
then it gets read by the startup file with this script command automatically
script ST2.
type config.cfg >> ST2
config file which contains only the "ABC"
i dont see how the above can work... and
it got more complicated. it was not just "ABC" and it was ABC.TRU and i need to change to ABC.TRC before i can send, i need a string manipulation later for this if there is one in dosboxx. i may have to look for someone who can write assembler to send errorlevels or something to read bytes from the 5th position to 5 + 8.3 = 16th position of a file.
there is more personal story below you can skip it at this point
*****************************************************************************
a file ST2. has 1 line in dosboxx and xtree in DOS, it looks like below
old ABC.Tru
the basic command code looks like below and it becomes the the DUMBEST binary HARDCODED blind macro(but once data are built, it is SOOOOOO powerful i cant replace it with anything else in the world). it is like DOS v3.3 command.com's edlin plus without display, you can't go back and change
ASK NAME A$
PRINT "old";" ";A$
END
why DUMB? it doesnt replace the macro key, it just adds next to it and the more i add, the more it consumes the real memory, in order to avoid this, i have to rewrite 100s key macros from the start without a mistake for several days with lots of headache. i have done several times back in the day, cant do no more, i'd rather hex-edit the macro file and reengineer and hack and rebuild the macro file if i ever knew how.
then it gets read by the startup file with this script command automatically
script ST2.