On Friday June 20 1997 at 15:12, John Hentsch wrote to Morris Turpin:
JH> Does someone have an example of running a procedure that starts Injoy,
JH> connects to your isp, calls a *.cmd to gets the news (I'm using vSoup),
JH> and then exits back to a frontend?
I've got a few batch files that do that without Injoy (just bare PPP.EXE).
Enjoy.
=== autonews.cmd ===
@echo off
:: Grabs newsgroups from ISP; uses netconnect.cmd; requires 4os2 and GO.
:: Both 4os2 and GO are on hobbes.
::
:: Look ma, simple error checking!
:: export messagebase -> soup packet
pushd g:\network\sqtool
sqtool
popd
:: netconnect returns errorlevel 1 if it could not connect.
call netconnect.cmd
if errorlevel eq 1 goto abort
:: news grabber
pushd g:\network\souper
:: Provide your own batch file to call vsoup.
call gn.cmd
popd
:abort
:: terminate PPP.EXE
go k ppp.exe
:: Import soup packet -> messagebase
pushd g:\network\sqtool
sqtool
popd
===
=== netconnect.cmd ===
@echo off
:: Connects to ISP. Requires 4os2 and GO. Called by autonews.cmd
:: Note all the below on one line
start /c /min `window "PPP.EXE" & ppp com2 57600 connect "slattach [INIT
STRING]
OK atdt [ACCESS NUMBER] CONNECT \r ogin: [LOGIN NAME] assword: [PASSWORD]"
modem notify rtscts defaultroute`
:: end of single line
set count=0
delay 7
:loop
delay 15
set count=%@inc[%count%]
if %count% ge 8 goto abort
ping [YOUR ISP's NEWS/MAIL/etc SERVER] 56 1 >nul
if not errorlevel eq 0 goto loop
echo Connection OK.
unset count
quit 0
:abort
go k ppp.exe >nul
echo Connection failed.
unset count
quit 1
===
--- GoldED/2 2.50 UNREG
---------------
* Origin: For sale: 30 pieces of silver. Contact N. Gingrich. (1:250/820)
|