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: sloetguy on Oct 16, '03 11:55:28AM

This will send what is in the username field:
write "^u\13"

This will send the password field:
write "^p\13"

The \13 is the return key so you should be able to get rid of that integrate it into a single line.

You can even do error checking so it will prompt you if the username is wrong.

Jason


note "Waiting for Username prompt..." 3
matchclr
matchstr 1 20 "sername: " !--- first letter ambiguity can't hurt...
matchread 150
note "No username prompt" 3
jump 99
!----------------------------------------------------------
!--- Connect successful. Time to login...
!--- Send the User's login
!----------------------------------------------------------
@LABEL 20
note "------------- label 20 ----------" 3
note "Sending Username..." 3
write "^u\13"
matchclr
matchstr 1 30 "assword: "
matchread 150
note "Timed out waiting for \34Password: \34 prompt." 3
jump 99

!----------------------------------------------------------
!--- Send the user's password
!----------------------------------------------------------
@LABEL 30
note "------------- label 30 ----------" 3
note "Sending Password..." 3
write "^p\13"



[ Reply to This | # ]