[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

5104.0. "VLTjr scripting question" by AIDEV::LANDINGHAM (Guy M., LMO2-1/D10, 296-5365) Sun Oct 06 1991 18:54

Hello,

Anyone out there using VLTjr?  I have a question about a script command:

What I'm trying to do is send the contents of a file (containing my login
password) in the middle of a "native" script (i.e. a ".scp" file).

I'm using version 5.045 of VLTjr.  I have a printout of the VLTStory manual.
It lists a command: "ASCii_send" as "Generally available".  But if I try a
simple .scp file such as:

#
# test ASCII send
#
ASCII_SEND s:passwd

...VLTjr complains with a script error: "token: ASCII_SEND...unknown command".

My understanding was that VLTjr was (script-wise) equivalent to VLT, but didn't
include the TEK emulation.

Can someone tell me why this isn't working?

Thanks.

T.RTitleUserPersonal
Name
DateLines
5104.1Try SENDCSSE32::SMITHReality, just a visible imagination?Sun Oct 06 1991 20:5810
    I use SEND to send ASCII to the host.  I have a script I use to dial
    into work using VLTjr, DF224 to LAT to VAX.  I post a de-passworded
    version later.  It's done in VLT native script.
    
    The specific command for sending ASCII I use is as follows:
                              
    send "password*R"
    
    
    ...Ed
5104.2Complete sample.scp (VLTjr, DF224, LAT, VMS)CSSE32::SMITHReality, just a visible imagination?Sun Oct 06 1991 21:51140
#   CSSE32.scp
# 
#   Author: Ed Smith
#
#   11/6/90    - first working version
#   11/7/90    - added disconnected and blink cursor routines
#   
#
#   Log on to VAX, using traps.
#
#

#   This is a simple blinker script

schedule ($blinker: cursorh 0; delay 0.6; cursorh 8; delay 0.6; goto $blinker)


# Setup to support multiple lines is one is not available

1st_line:
        goto line1

next_line:        
        goto line2
                
line1:
        emit "*R*NDialing ... *R*N"
        send "*X01T12345657!"
        goto begin
        
line2:
        emit "*R*NDialing ... *R*N"
        send "*X01T2345678!"
        goto begin
     

# These traps take care of LAT username, VMS username and password then
# terminate themselfs.  I found the delays necessary.   

begin:
trap add 1 (Enter username> ) (send "username*R"; delay 0.6; send "Connect NODE_A*R"; trap remove 1)
trap add 2 (Username: ) (send "username*R"; delay 0.2; trap remove 2)
trap add 3 (Password: ) (send "password*R"; delay 0.2; trap remove 3)


# I keep trying nodes til the cows come home or I run out in the cluster

trap add 4 (Service NODE_A not known) (break; delay 0.6; send "Connect NODE_B*R"; delay 0.2; trap remove 4)
trap add 5 (Service NODE_B not known) (break; delay 0.6; send "Connect NODE_C*R"; delay 0.2; trap remove 5)
trap add 6 (Service NODE_C not known) (break; delay 0.6; send "Connect NODE_D*R"; delay 0.2; trap remove 6)
trap add 7 (Service NODE_D not known) (exit quiet)


# This trap is used on a re-connect when your process is still alive

trap add 8 ([YES]) (delay 0.3; send "*R"; delay 0.2; trap remove 8; exit quiet)


# DF224 Modem responses and their handler routines (not all verified)

on "Attached"           goto attached_host
on "Error"              goto syntax_error
on "No answer"          goto no_answer
on "No dial tone"       goto no_dial_tone
on "Busy"               goto busy_line
on "Disconnected  "     goto try_again
on "Speed"              goto reset

       
# General timer, 1 minute for a login or give up

start:
        delay 1:00
        emit "*R*NNo response from modem within 1 minute, exiting...*R*N"
        goto end


# When the modem is 'Attached', get the LAT's attention with <CR>'s.
# I use to only send 5 before giving up but my LAT is not always
# consistant in responding after 5, so now I just loop here.

attached_host:
        on "#" goto connected 
attached_host_retry:        
        send (*R)
        delay 1
        goto attached_host_retry
        

# On the LAT response of a #, send your LAT password. Finish up by waiting for
# your node's prompt, ie $ or what ever you have set it to.  In my case it's 
# the system's nodename and a >.

connected:
        send "LAT_PASSWORD*R"
        on "NODE_A>" goto end
        on "NODE_B>" goto end
        on "NODE_C>" goto end
        on "NODE_D>" goto end
        delay 1:00
        emit "*R*NNo response from Host within 1 minute, exiting...*R*N"
        goto end

        
# These next few handle various modem detected problems by either exiting
# or trying another line.

syntax_error:
        emit "*R*NInvalid syntax was detected, exiting...*R*N"
        goto end

no_answer:
        emit "*R*NNo answer, trying next number*R*N"
        goto next_line

no_dial_tone:
        emit "*R*NNo dial tone, telephone or modem failed, exiting...*R*N" 
        goto end
        
try_again:
        emit "*R*NOpps line dropped, trying another line...*R*N"
        hangup
        delay 2
        trap remove all
        goto next_line

reset:
        hangup
        delay 2
        emit "*R*NSpeed dropped, reset to 2400 baud, trying next number*R*N"
        goto next_line

busy_line:
        emit "*R*NLine busy, trying next number*R*N"
        goto next_line
                
end:
        trap remove all
        exit quiet
    
5104.3CLOVAX::COBURNGrowing older, but not up...Sun Oct 06 1991 22:4414
    Re: .1
    
    I use VLTjr to autodial as well and I embed the password into the
    script file. This is not what .0 wanted - they were looking for a way
    to send the password from a seperate file. 
    
    The ASCII_SEND is not a script command. It probably was refering to the
    capability to upload a file using the xprascii.library (which is
    generally available I guess). 
    
    There is no script command to read from a file. Your best bet is to get
    xprascii.library and setup for as ascii transfer at the proper time.
    
    John
5104.4Already using SEND, need to send FILEAIDEV::LANDINGHAMGuy M., LMO2-1/D10, 296-5365Mon Oct 07 1991 14:4127
>    I use VLTjr to autodial as well and I embed the password into the
>    script file. This is not what .0 wanted - they were looking for a way
>    to send the password from a seperate file. 

John: exactly right.  I have scripts now which use the SEND command.  I should
have probably explained a little more.  I have scripts for logging in to my
account via several lines/connection types (direct, PBX, TSN, etc.); right now
each of these files has my password in it, which makes it a little hard to
manage whenever my pw changes.  I thought putting the password string into one
"shared" file would be a nice solution.

>    The ASCII_SEND is not a script command. It probably was refering to the
>    capability to upload a file using the xprascii.library (which is
>    generally available I guess). 

Huh?  My copy of the manual does list ASCII_SEND as a "generally available
script command".  In the manual it is in the same list as other script commands,
which *do* work for me when I try them in a ".scp".

>    There is no script command to read from a file. Your best bet is to get
>    xprascii.library and setup for as ascii transfer at the proper time.

I have XPRAscii.library.  But I can't seem to figure out how to invoke it from a
script.  If you know the proper sequence, could you post it please?


Thanks very much for all of the help...
5104.5TENAYA::MWMMon Oct 07 1991 16:196
If anyone is interested, I could upload my Dial script. I use a seperate
"password" script that fetches the password from the clip list, or gets
it from the user if it's not there. Net result: no passwords on the
disk, but I only have to type a password once after powercycling the machine.

	<mike
5104.6Please post, thanks!AIDEV::LANDINGHAMGuy M., LMO2-1/D10, 296-5365Mon Oct 07 1991 17:109
    Re: .-1
    
    Yes, please do, any examples would be helpful.   Thanks!
    
    Re: ASCII_SEND
    
    I really think this is a VLTjr bug, either in the program or docs.  I'm
    sending it to Willy...
    
5104.7CLOVAX::COBURNGrowing older, but not up...Mon Oct 07 1991 17:217
    re: .5
    
    Mike - I would be interested in seeing your dialup script as well.
    
    Thanks.
    
    John
5104.8An "authoritative" answer!AIDEV::LANDINGHAMGuy M., LMO2-1/D10, 296-5365Mon Oct 07 1991 21:1326
    Here's the answer Willy gave me (I must have a bogus copy of VLTStory,
    'cause it really does list ASCii_send as a valid script command):
    
In-Reply-To: [email protected] -- 10/06/91 15:28
     
Kip -
       That doesn't work because there is no such thing as an
ASCII_SEND script command. I am sure the docs don't state anywhere that
this *should* work, either. To do an ASCII send, you have to use the
xprascii library. To see how that works, refer to the SendASCII.vlt
ARexx program that comes with VLT (that is, if you got 5.034 and then
5.045, the correct order). If you have any problems, let me know...
     
       Willy.

% ====== Internet headers and postmarks (see DECWRL::GATEWAY.DOC) ======
% Received: by enet-gw.pa.dec.com; id AA06195; Mon, 7 Oct 91 15:54:09 -0700
% Received: from SLACVM.SLAC.STANFORD.EDU (MAILER@SLACVM) by SCS.SLAC.STANFORD.EDU with PMDF#10283; Mon, 7 Oct 1991 15:53 PD
% Received: by SLACVM (Mailer R2.08 R208004) id 8035; Mon, 07 Oct 91 15:53:15 PST
% Date: Mon, 07 Oct 1991   15:50 -0800 (PST)
% From: [email protected]
% Subject: Re: VLTjr scripting question
% To: aidev::landingham
% Message-Id: <[email protected]>
% X-Envelope-To: [email protected]
    
5104.9Scripts...TENAYA::MWMTue Oct 08 1991 16:1867
Here's the script I use to dial into UCO (with minor editing). Note that I
dial into Ultrix systems, and use a modem with the Hayes AT prefix turned
off, and the prompt set to "*".

#   DialDEC.scp
#
#   Call DEC, and talk to the silly LAT...
#

trap add    (username> )    (send "mwm*R")
trap add    (Local> )       (send "c fenris*R")
trap add    (login: )       (send "mwm*R")
on          (BUSY)          goto out

on (**) goto call
send "*R"
delay 3
message (The modem must be in command mode)
out:
BEEP
exit quiet

call:
on (**) ""
send "&E*R"
wait "**"
send "DTyournumberhere*R"
wait CONNECT

on (# ) goto lat

loop:
send "*R"
delay 1
goto loop

# Get user to type lat the password...
lat:
rx [call password lat]
wait (word:)            #   Wait for Password or else the above traps would expi
re.
rx [call password dec]
mouse on
exit quiet

And here's the "password" Rexx script that checks the cliplist for a password,
and sends it if it finds it. Thist should be rexx:password.vlt

/* Sends the password for the system named as an argument. */
parse arg sysname
password = getclip(sysname'-PASSWORD')
if password ~= '' then do
        'send ('password'*R)'
        return
        end

if ~show('Libraries', 'rexxarplib.library') then do
        if ~addlib('rexxarplib.library', 0, -30) then do
                'message "No rexxarplib, so no password entry!"'
                exit
                end
        end

password = request(11, 11, "Password for" sysname"?", "",, "Cancel")
if password = '' then return
call setclip(sysname'-PASSWORD', password)
'send ('password'*R)'
5104.10Parity = 8N2 ??CARROL::MELLITZMon Dec 09 1991 22:064
    Does any one know the syntax for setting parity to 8N2 in a vlt script?
    
    thanks,
    Rich