rosco Member


Joined: 15 May 2005 Posts: 114 Location: Newcastle, Australia
|
Posted: Mon Oct 24, 2005 9:16 pm Post subject: Modem login script |
|
|
I have a modem 'net connection and I'm trying to put a login script in place. I can log in just fine using a terminal window but the script has me beat. I can find very little to help on the net.
What I need the script to do:
Wait for "ogin:"
Send "name"
Wait for "assword"
Send "password"
Wait for "9)"
Send "9"
Simple eh? Well, you thought it would be...
I created the "/Library/Terminal Scripts" folder and put the script in it. Permissions were set to me username's but are now root:admin in line with other stuff in the /Library folder.
This is what I now have in the script:
--------------------------
Note "Waiting for Username prompt..." 3
matchclr
matchstr 1 20 "sername:
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"
matchclr
matchstr 1 40 "9)"
matchread 150
note "Timed out waiting for \34Menu \34 prompt." 3
jump 99
!----------------------------------------------------------
!--- Send the user's menu selection
!----------------------------------------------------------
@LABEL 40
note "------------- label 40 ----------" 3
note "Sending menu selection (9)..." 3
write "9\13"
--------------------------
When I try to log in I get a message that the script failed.
Anyone know how to make this work? |
|