123Macmini.com
FAQFAQ   SearchSearch   MemberlistMemberlist   GalleryPhoto Gallery   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Modem login script

 
Post new topic   Reply to topic    123Macmini.com - Forums Forum Index -> Mac OS X
View previous topic :: View next topic  
Author Message
rosco
Member
Member


Joined: 15 May 2005
Posts: 114
Location: Newcastle, Australia

PostPosted: Mon Oct 24, 2005 9:16 pm    Post subject: Modem login script Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    123Macmini.com - Forums Forum Index -> Mac OS X All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



      

Shop:  Apple Store  |  Refurbished Macs  |  Refurbished iPads  |  MacConnection  |  Mac Mini Vault  |  Other World Computing

MK 1 Studio Mac mini Racks  |  Crucial Mac Memory  |  Top Free Mac Apps  |  Top Paid Mac Apps



123Macmini.com is an independent publication and has not been authorized, sponsored, or approved by Apple Computer, Inc.
All logos and trademarks in this site are property of their respective owners.
Copyright © 2011 123Macmini.com. All Rights Reserved.