Article View: comp.sys.acorn.networking
Article #583Re: FreeNet - SlipDial script
From: Kevin F. Quinn
Date: Sat, 20 May 1995 00:00
Date: Sat, 20 May 1995 00:00
135 lines
4519 bytes
4519 bytes
Follow-ups set to demon.ip.support.archimedes.
In article <19950519.215345.76@compton.demon.co.uk>,
freenet@compton.demon.co.uk (FreeNet Development) wrote:
> Your attention please... I am pleased to announce the arrival
> of FreeNet at an FTP site near you!
Yippee :)
Anyone who hasn't yet written a SlipDial script for this, might
like to try mine - it's not particularly flashy (distinctly un-flashy
in fact) but it works :)
It gives you a "Dial up" option to dial up the PoP, and a "LoadInfo"
option to reload the SLIPInfo file (see below). Once on-line, it
changes to only a "Disconnect" option which shuts FreeNet down,
clearing the line in the process. It works with SlipDial 0.33;
haven't tried it with 0.34. Shout at me if there's anything wrong...
Two files; first is a configuration file for the script.
Change the details as appropriate and put it in FreeUser.Files
as SLIPInfo:
--------------- !FreeUser.Files.SLIPInfo ---------------
banana
PASSWORD
Internal
0
57600
01734-284848
Reading
mru=576,slip
Supra
--------------------------------------------------------
In order, the fields are host name, password, serial driver
name, serial port number, serial link speed, PoP telephone
number, PoP name, protocol string and lastly modem driver
name (i.e. the name of the relevant file in !SlipDial.Drivers).
Don't put in any blank lines and stuff
Second is the script itself; save it in SlipDial.Scripts as DemonF and
reconfigure SlipDial to use "DemonF" instead of "Demon", or whatever
it's called (use the "Choices..." option on the SlipDial iconbar
menu).
--------------- !SlipDial.Scripts.DemonF --------------
#slipdial
debug 2
menu "Loading SLIPInfo:message Wait."
echo /status "Loading SLIP Info"
call ReadSLIPInfo
driver %modem
port %sdriver %sport
speed %sspeed
retry 1 1
:loop
menu "Dial up:call DialUp" "LoadInfo:call ReadSLIPInfo" "Quit:quit"
wait /event
goto loop
exit
:ReadSLIPInfo
open /id=info /error="call AbortSLIPInfo" /read <FreeUser$Dir>.files.SLIPInfo
read /id=info /eof="goto AbortSLIPInfo" login
read /id=info /eof="goto AbortSLIPInfo" password
read /id=info /eof="goto AbortSLIPInfo" sdriver
read /id=info /eof="goto AbortSLIPInfo" sport
read /id=info /eof="goto AbortSLIPInfo" sspeed
read /id=info /eof="goto AbortSLIPInfo" popnum
read /id=info /eof="goto AbortSLIPInfo" popname
read /id=info /eof="goto AbortSLIPInfo" linkprot
read /id=info /eof="goto AbortSLIPInfo" modem
close /id=info
return
:AbortSLIPInfo
message "Sorry, SLIPInfo file not found."
close /id=info
exit
:DialUp
if (!claim 3) goto CantClaim
:DUloopdial
init
echo /status "Dialling %popname"
if (dial/retry=1/delay=1 %popnum) goto DUdialled
:DUloopcont
goto DUloopdial
:DUdialled
if (!wait/delay=30 ogin:) goto AbortDialUp
send %login
if (!wait/delay=30 assword:) goto AbortDialUp
send %password
if (!wait/delay=30 rotocol:) goto AbortDialUp
send %linkprot
#message /capture /end="HELLO" /maxlines=5 /centre
if (!wait/delay=30 HELLO) goto AbortDialUp
task <FreeUser$Dir>.Startup
alarm /dcd=0 "goto SessionEnd"
:CLoop
menu "Disconnect:goto SessionEnd" "Quit:quit"
wait /event
#message /close
goto CLoop
:SessionEnd
release
task <FreeUser$Dir>.Shutdown
return
:AbortDialUp
release
message "Dialup aborted - timeout."
if (!claim 3) goto CantClaim
goto DUloopdial
:CantClaim
message "Can't claim the serial port."
return
--------------------------------------------------------
--
Kevin F. Quinn * "No-one ever made any money out of good
kevq@banana.demon.co.uk * looks and charm."
kevq@cix.compulink.co.uk * "You obviously haven't met Lady Hamilton..."
Compu$erve: 100025,1525 * Blackadder III
Technical Details
Message-ID:
<19950520.174712.96@banana.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<19950519.215345.76@compton.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114044,da8aae73d5de535d X-Google-Attributes: gid114044,public X-Google-Thread: 11173c,51cebf07a3fa788f X-Google-Attributes: gid11173c,public From: kevq@banana.demon.co.uk (Kevin F. Quinn) Subject: Re: FreeNet - SlipDial script Date: 1995/05/20 Message-ID: <19950520.174712.96@banana.demon.co.uk> X-Deja-AN: 102951033 distribution: world x-nntp-posting-host: banana.demon.co.uk sender: news@news.demon.co.uk references: <19950519.215345.76@compton.demon.co.uk> followup-to: demon.ip.support.archimedes organization: The Banana Arc reply-to: kevq@banana.demon.co.uk newsgroups: comp.sys.acorn.networking,demon.ip.support.archimedes