Type 7 - advanced batch file under XP
From
Aaron Grasswell@1:229/428 to
All on Fri Apr 16 19:25:00 2021
Hi Everyone,
I'm posting this here more for documentation than anything else.
I'm a huge proponent of the Demoscene, especially Nectarine Demoscene Radio.
I wanted to be able to display the currently playing song & artist on my BBS in an ASC menu screen.
I run my RemoteAccess BBS under 32bit XP, so I accomplished this by using CURL to query the Nectarine API endpoint that responds with XML containing the currently playing song, artist, upcoming queue etc...
I use several DOS commands in a batch file that pases the resulting CURL results and extracts the current song/artist, strips away the rest of the text and then writes the final song/artist variables into two text files.
I then use the control code ^K! to insert the desired song/artist file contents into the ASC menu image file where I wish it to appear.
The trick was getting the batch file to run properly as a Type 7 when the menu loads.
It would run, but NONE of the advanced features of the batch commands would work. FOR and FINDSTR were nonexistent, giving nothing but syntax and command not found errors.
The batch file would execute peoperly when run directly form the command prompt, but being called from RA as a Type 7.. forget it.
Here's how to fix that issue:
In RACONFIG, setup a Type 7 execute sub-program, and on the OPTDATA line, call the batch file using:
*C /C cmd.exe /c c:\ra\doors\necta\go.bat
FIXED!
Apparently I needed to designate cmd.exe otherwise command.com was being invoked and it didn't contain the internal FOR/FINDSTR commands...
Hope that helps someone down the road!
Take care
Aaron/DW
--- D'Bridge 4
* Origin: Dark Systems BBS (1:229/428)