home *** CD-ROM | disk | FTP | other *** search
- :(o,,(
- <**************************************************************************>
- <* This script was automatically generated by WDial teach mode ver. 3.20. *>
- <* Created: Sat Dec 23 13:09:07 1995 *>
- <**************************************************************************>
- ))
-
- :(o,,(
- <*****************************************>
- <* Trac equivalent of (slang_init_modem) *>
- <*****************************************>
- ))
- :(mm,slang_init_modem,(
- :(wdial_status,(Initializing the modem...))
- :(s,tmp,:(wdial_modem,init))
- :(pc,(
- :(pc,(
- :(ei,:(tn,tmp,1,(:(px))),~,(
- :(iwm,1000)
- ),(
- :(tps,tmp,:(as,:(tpr,tmp),1))
- :(px)
- ))
- ),-1)
- :(iz2)
- :(o2,:(ts,tmp,,|,(:(px))):(bxo,0d))
- :(s,resp,:(iwt2,10000,OK,ERROR))
- :(pc,(
- :(ttci,resp,OK,(
- :(px)
- ))
- :(ttci,resp,ERROR,(
- :(wdial_status,(Modem Error))
- :(g)
- ))
- :(wdial_messagei,
- (Your modem is not responding. )
- (Please be sure it is turned on and connected to your )
- (computer correctly. Would you like to try again?),YESNO,Q,1,(
- :(tps,tmp,0)
- :(ibdf)
- :(iwm,1000)
- :(ibdo)
- :(iwm,1000)
- ),(
- :(wdial_status,(No response from modem))
- :(g)
- ))
- ))
- ),-1)
- :(iwm,2000)
- :(d,resp)
- :(d,tmp)
-
- ))
-
-
-
- :(o,,(
- <************************************************>
- <* Connect to provider, with redial/retry logic *>
- <************************************************>
- ))
- :(mm,connect,(
- :(wdial_polli,physical,open,1,(
-
- <* Hangup *>
- :(o2,:(wdial_modem,hangup):(tca,13))
- :(s,junk,:(iwt2,2000,OK))
- :(d,junk)
- ))
-
- :(slang_init_modem)
- <* Init the modem *>
-
- :(s,pnum,:(wdial_phone,number))
- :(ei,:(r,pnum),,(
- :(s,pnum,:(wdial_prompt,(Please enter the phone number to
- dial:)))
- ))
- :(tra,pnum,:(tca,41))
-
- <* Get rid of parentheses *>
- :(tra,pnum,:(tca,40))
- :(tra,pnum,(-))
- <* Get rid of dashes *>
-
- :(s,dmsg,(NONE))
- :(pc,(
- :(iz2)
- :(wdial_status,(Last Error:):(r,dmsg):(tca,10)
- (Dialing...))
- :(s,again,n)
- <* Clear loop again flag *>
-
- <* Dial *>
- :(o2,
- :(wdial_modem,dial)
- :(ei,:(wdial_phone,prefix),,,(
- :(wdial_phone,prefix)
- <* :(pc,(:(wdial_modem,pause)),2) *>
- ))
- :(r,pnum)
- :(ei,:(wdial_phone,ext),,,(
- :(pc,(:(wdial_modem,pause)),2)
- :(wdial_phone,ext)
- ))
- :(tca,13)
- )
- :(s,junk,:(iwt2,1000))
-
- <* Empty Recv Buffer *>
- :(d,junk)
-
- <* Wait for response *>
- :(wdial_status,(Last Error:):(r,dmsg):(tca,10)
- (Dialing...):(tca,10)
- (Timeout in %d seconds)
- ,:(aq,:(wdial_phone,timeout),1000))
-
- :(s,response,:(iwt2,:(wdial_phone,timeout),CONNECT,BUSY,ERROR,
- (NO CARRIER),(NO DIALTONE),(NO ANSWER)))
-
- :(pc,( <* Case *>
- :(ttci,response,CONNECT,(
- :(s,again,done)
- :(px)
- ))
- :(ttci,response,BUSY,(
- :(wdial_status,(BUSY))
- :(s,query,:(wdial_message,(The number
- you
- dialed is Busy. Would you
- like to try again?),YESNO,q,1,y,n))
- :(s,again,:(r,query))
- :(s,dmsg,(BUSY))
- :(px)
- ))
-
- :(ttci,response,ERROR,(
- :(wdial_status,(Modem Error))
- :(wdial_message,(Modem Error, Connection
- Failed),OK,e)
- :(px)
- ))
- :(ttci,response,(NO CARRIER),(
- :(wdial_status,(NO CARRIER))
- :(s,query,:(wdial_message,(Unable to
- connect to remote modem. Would you
- like to try again?),YESNO,q,1,y,n))
- :(s,again,:(r,query))
- :(s,dmsg,(NO CARRIER))
- :(px)
- ))
- :(ttci,response,(NO DIALTONE),(
- :(wdial_status,(NO DIALTONE))
- :(s,query,:(wdial_message,(No
- Dialtone.
- Would you like to try
-
- again?),YESNO,q,1,y,n))
- :(s,again,:(r,query))
- :(s,dmsg,(NO DIALTONE))
- :(px)
- ))
- :(ttci,response,(NO ANSWER),(
- :(wdial_status,(NO ANSWER))
- :(s,query,:(wdial_message,(No Answer.
- Would you like to try
- again?),YESNO,q,1,y,n))
- :(s,again,:(r,query))
- :(s,dmsg,(NO ANSWER))
- :(px)
- ))
- <* Unknown response / TIMEOUT *>
- :(o2,:(tca,13))
- :(wdial_status,(TIMEOUT))
- :(s,query,:(wdial_message,(TIMEOUT. Would you
- like to try
- again?),YESNO,q,1,y,n))
- :(wdial_pause,5000)
- :(iz2)
- :(s,again,:(r,query))
- :(s,dmsg,(TIMEOUT))
- ),1) <* End Case *>
-
- <* Check for loop again *>
- :(ei,:(r,again),y,,(
- :(px)
- ))
- ),-1)
-
-
- :(ei,:(r,again),done,,(
- :(sexit)
- ))
-
- :(d,again,query,response,pnum)
-
- :(wdial_status,(Waiting for Physical Connection...):(tca,10)
- (Timeout in %d seconds),:(aq,:(wdial_phone,timeout),1000))
- :(wdial_polli,physical,open,:(wdial_phone,timeout),(
- :(wdial_status,(Physical connection established))
- :(wdial_pause,1000)
- ),(
- :(wdial_message,(Physical layer not opened. Connection
- Failed!),OK,e)
- :(sexit)
- ))
- ))
-
-
-
-
- :(o,,(
- <********************************************>
- <* Wait for callback (for DEFENDER systems) *>
- <********************************************>
- ))
- :(mm,callback,(
- :(wdial_status,(Waiting for provider to hangup...):(tca,10)
- (Timeout in %d seconds),:(aq,:(wdial_phone,timeout),1000))
- :(wdial_polli,physical,closed,:(wdial_phone,timeout),,(
- :(wdial_message,(The provider never hung up. Connection
- Failed!),OK,e)
- :(sexit)
- ))
-
- :(wdial_status,(Waiting for callback...):(tca,10)
- (Timeout in %d seconds),24000)
- :(s,tmp,:(iwt2,2400000,RING)) <* Wait for
- RING *>
- :(ttci,tmp,RING,,(
- :(wdial_message,(The provider never called back.
- Connection Failed!),OK,e)
- :(sexit)
- ))
-
- :(wdial_status,(Answering phone))
- :(o2,ATA:(tca,13))
- <* Answer Modem *>
-
- :(wdial_status,(Waiting for Physical Connection...):(tca,10)
- (Timeout in %d seconds),:(aq,:(wdial_phone,timeout),1000))
- :(wdial_polli,physical,open,:(wdial_phone,timeout),(
- :(wdial_status,(Physical connection established))
- :(wdial_pause,1000)
- ),(
- :(wdial_message,(Physical layer not opened. Connection
- Failed!),OK,e)
- :(sexit)
- ))
- ))
-
- :(mm,abort,(
- :(wdial_status,(Not connected))
- :(wdial_message, (The other side hung up. Connection Failed!))
- :(g)
- <* exit script if no carrier *>
- ))
-
- :(mm,did_they_hang_up?,(
- :(wdial_polli, physical, open, , , (
- :(abort)
- ))
- ))
-
- :(o,,(
- <*********************>
- <* Ask user for help *>
- <*********************>
- ))
- :(mm,response_not_recognized, (
- :(wdial_status,(Waiting for user input))
- :(s, user_data,
- :(wdial_prompt,:(r,input_data)
- (
- )
-
- (Response not recognized!
- )
- (You
- must either:
- )
- (
- o Run the
- `teach' mode script again
- )
- (
- )
- (
- o Enter a
- response to continue connecting.
- )
- (
- )
- (Type
- 'EXIT' to abort.)
- ))
- :(ttci, :(r, user_data), EXIT,
- ( :(sexit) ),
- ( :(o2, :(r, user_data) :(tca,13)) ))
- ))
-
- :(mm,hangup,(
- :(ibdf)
- :(wdial_polli,physical,close,2000,,(
- :(o2,+++)
- :(wdial_pause,2000)
- :(o2,ATH0:(tca,13))
- :(wdial_pause,2000)
- ))
- ))
-
- :(o,,(
- <*******************************************************>
- <* Exit gracefully, ERROR *>
- <*******************************************************>
- ))
- :(mm,sexit,(
- :(wdial_status,(Not connected))
- :(g)
- ))
-
- :(o,,(
- <*******************************************************>
- <* Negotiate layers etc. *>
- <*******************************************************>
- ))
- :(mm,topacket,(
- <* Change to packet mode *>
- :(wdial_changemode,packet)
-
- :(ei,:(wdial_frametype),SLIP,,(
- <* PPP Mode *>
-
- <* Open LCP Layer *>
- :(wdial_status,(Waiting for Link Control...):(tca,10)
- (Timeout in %d
- seconds),:(aq,:(wdial_phone,timeout),1000))
- :(s,stoptime,:(aa,:(xcm),:(wdial_phone,timeout)))
- :(pc, (
- :(did_they_hang_up?)
- :(wdial_polli,lcp,open,1000,(
- :(px)
- ))
- :(agi,:(xcm),:(r,stoptime),(
- :(wdial_changemode,raw)
- :(hangup)
- :(wdial_message,(Link control not
- established. Connection Failed!),OK,e)
- :(sexit)
- ))
- ),-1)
-
- <* Open IPCP Layer *>
- :(wdial_status,(Waiting for Network Control...):(tca,10)
- (Timeout in %d
- seconds),:(aq,:(wdial_phone,timeout),1000))
- :(s,stoptime,:(aa,:(xcm),:(wdial_phone,timeout)))
- :(pc, (
- :(did_they_hang_up?)
- :(wdial_polli,ipcp,open,1000,(
- :(px)
- ))
- :(agi,:(xcm),:(r,stoptime),(
- :(wdial_changemode,raw)
- :(hangup)
- :(wdial_message,(Network control not
- established. Connection Failed!),OK,e)
- :(sexit)
- ))
- ),-1)
- ))
-
- :(wdial_status,(Connected))
- ))
-
- :(o,,(
- <* Return user's password or ask for it *>
- ))
- :(mm,pword,(
- :(ei,:(wdial_passcode),,(
- :(wdial_passcode,:(wdial_prompt, (Please enter your password:), *))
- ))
- :(wdial_passcode)
- ))
-
- :(o,,(
- <* Return user's userid or ask for it *>
- ))
- :(mm,uname,(
- :(ei,:(wdial_username),,(
- :(wdial_username,:(wdial_prompt, (Please enter your username:)))
- ))
- :(wdial_username)
- ))
-
- :(o,,(
- <*** END Genlearn Common Macros ***>
- <*----------------------------------------*>
- ))
-
-
- :(o,,(
- <*** BEGIN Learned Script ***>
- <*--------------------------*>
- ))
-
-
- :(o,,(
- <****************>
- <* Connect/Dial *>
- <****************>
- ))
- :(connect)
-
-
-
-
- :(o,,(
- <*** END Learned Script ***>
- <*--------------------------*>
- ))
-
- :(o,,(
- <***************************>
- <* Change Into Packet Mode *>
- <***************************>
- ))
- :(topacket)
-
- :(o,,(
- <************************>
- <* Terminate The Script *>
- <************************>
- ))
- :(wdial_status,(Connected))
- :(g)
-