Hello!

This is dip-3.3.7n-uri-inaky-jsi, a further modified dip-3.3.7n-uri-inaky.

My problem was a dial - ring - dial-again connection to our university.
In the first dial-step you log in as usual, and give your own
telephone-number.

In the ring-step you are called back on this number and get a password.

In the dial-again-step you give this password as your login-password.

So I searched a way to get this password in a variable, and therefor
automate this procedure.

I introduced string-variables:
You now have: "usual" integer-variables: $variable
               new string-variables    : $$variable

So you can get strings with 'get $$variable ...',
send them to the serial driver via 'send $$varable ...'
and for completeness compare strings with if, and 
enter a password in a variable.

So here are some examples:
DIP> get $$test This_is_a_Test
DIP> print $$test
This_is_a_Test
DIP> if $$test != This goto ttt    
dip: GOTO not possible in TEST mode! [$$test is not equal to 'This']

DIP> get $$test ask Username:\s
Username: [user enters:] Test-user
DIP> print $$test
Test-user
DIP> password $$pass Password-Prompt: 
Password-Prompt: [user enters: password]
DIP> print $$pass
password
DIP> send $$test \r $$pass \r [send 'Test-user\rpassword\r' to serial line]
DIP> get $$input remote 10 [remote line sends: slip_open]
DIP> print $$input
slip_open

DIP> get $$init at\sz\r            
DIP> print $$init
at\sz\r
DIP> get $$init at\sz\r            
DIP> print $$init
at\sz\r
DIP> send $$init [Modem gets: at z\r]        

If you get a string from remote the first white spaces are discarded,
and then the string is read until the next white space appears.

In this version spaces between the arguments of send are not sent to 
the serial driver. If you want to send spaces, you have to send \s. 
You have to do it like this with $ and \: Send \$ and \\. 

And yet another feature: You can copy variables!
Very useful for checking the errorlevel of dial:
dial nnnn
get $e $errlvl
if $e == 1 goto aaa
if $e == 2 goto bbb
Otherwise the first 'if' would destroy the errorlevel!

I included a script 'rz.dip' in this version to show how everything works.
This script is in german, so you would use the translated script rz.english.dip.
rz.english.connect_example shows how the dial-ring-dialback procedure
works. For me only rz.dip works, since the messages from our
university are in german, too. 

Known Problems:
 - If you get something like 'this\shows\it' in a variable, and send 
   it to the serial driver, you would send 'this hows?t'.
                                                ^:\s ^:\i (doesn't exist!)
   So the escapes are expanded. Very worse with Passwords containing '\'.

 - String-variables can only contain < 128 characters. (But who needs more ?)
 
 - Don't use 'password $$password:' to get a password with prompt
   '$$password:' and send the input to the remote line:
   You would set a variable '$$password:' with the input and send nothing 
   to remote.

Almost all scripts from inaky's Version (& uri's, too) should run on 
this version. To adapt scrpits to my version, just take a look at it for
Variable-names beginning with '$$', and spaces in send-commands.

And finally the disclaimer from inaky also applies to my version:
 Well, use this *AT*YOUR*OWN*RISK*. I don't guarantee functionality
of this program better than Uri's or Fred's versions.

My E-Mail is jsi@tierzucht.uni-kiel.de, mail *me* for information/problems 
with this version of dip, and noone else.

   Enjoy!
 
      Josef Siemes
