Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Run a script to automate PPP connections' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Run a script to automate PPP connections
Authored by: LinuxZealot2003 on Oct 16, '03 08:46:57AM
Thanks kids. With this hint and some googling around on the net, I was able to connect to my compuserve account from OS 10.2. I can find no documentation for Apple's chat language, which looks way different from the unix/linux chat(8) command. But I found a couple of sample files and by examination I was able to cobble together a working ppp login chat script for compuserve's 800 number. Here's the results of my hacking:
!
@ANSWER
@HANGUP
EXIT 0
!
@ORIGINATE
!
CHRDELAY 1
!
@LABEL 10
IncTries
IfTries 5 99
PAUSE 5
WRITE "\13"
!
@LABEL 11
MATCHCLR
MATCHSTR 1 12 "Host Name:"
MATCHREAD 300
NOTE "Connect script couldn't match \34Host Name:\34.  Retrying" 3
JUMP 10
!
@LABEL 12
WRITE "+CIS\13"
!
@LABEL 13
MATCHCLR
MATCHSTR 1 14 "ID:"
MATCHREAD 300
NOTE "Connect script couldn't match \34ID:\34."
JUMP 99
!
@LABEL 14
WRITE "YOUR.ID/GO:PPPCONNECT\YOUR.PASS\13"
PAUSE 3
JUMP 90
!
@LABEL 90
PAUSE 1
EXIT 0
!
@LABEL 99
PAUSE 60
EXIT -6002 "Connection script failed."
You will, of course, have to substitute your compuserve ID for "YOUR.ID" and your password for "YOUR.PASS". Alas, if I had doc on this language, or even a few more connect script examples, I could probably make a far more elegant thing. Maybe I could even find a way to incorporate the password you enter into the 'ppp preferences' window. This sample ignores that field, and leaves your password in the clear on your hard drive. So it goes in the closed-source world, I guess. If you edit this file into a file called "Compuserve", add your ID information, and place it in the directory mentioned in the other comments, you'll be able to automatically log in to compuserve's ppp server. If you have trouble, there's a 'verbose logging' option in the ppp options page which may give you enough information to debug the script in /var/log/syslog. Anyway, my wife is now reasonably happy with my computing prowess.

[ Reply to This | # ]
Run a script to automate PPP connections
Authored by: LinuxZealot2003 on Oct 16, '03 09:37:12AM

Argh. Betrayed by the evil html.

This is the correct script. Note the backslash ("\") characters.

!
@ANSWER
@HANGUP
EXIT 0
!
@ORIGINATE
!
CHRDELAY 1
!
@LABEL 10
IncTries
IfTries 5 99
PAUSE 5
WRITE "\13"
!
@LABEL 11
MATCHCLR
MATCHSTR 1 12 "Host Name:"
MATCHREAD 300
NOTE "Connect script couldn't match \34Host Name:\34. Retrying" 3
JUMP 10
!
@LABEL 12
WRITE "+CIS\13"
!
@LABEL 13
MATCHCLR
MATCHSTR 1 14 "ID:"
MATCHREAD 300
NOTE "Connect script couldn't match \34ID:\34."
JUMP 99
!
@LABEL 14
WRITE "YOUR.COMPUSERVEID/GO:PPPCONNECT\\YOUR.PASSWORD\13"
PAUSE 3
JUMP 90
!
@LABEL 90
PAUSE 1
EXIT 0
!
@LABEL 99
PAUSE 60
EXIT -6002 "Connection script failed."



[ Reply to This | # ]
Wait for Callback?
Authored by: Anonymous on Dec 15, '03 03:52:05AM

I've searched in vain for a "dictionary" or tutorial on how to modify the above script. What I want to do is HangUp once I've authenticated (or have the server Hang Up on me) and then "answer" and incoming call and log in again.

I've found some scripts that do it in SCO, and windows, but obviously the script doesn't use the same language. Would one of you gurus know how to do it?

Thanks.



[ Reply to This | # ]