;BasicLogonXfer.WAS     v1.0

;*****************************************************************************
;*                                                                           *
;* BasicLogonXfer.WAS                                                        *
;* Copyright (C) 1998 Symantec                                               *
;* All rights reserved.                                                      *
;*                                                                           *
;* Written by:  Symantec ASPECT Assist                                       *
;* 10/22/97                                                                  *
;*                                                                           *                                                                             
;* This script file is designed to call into a Procomm Plus Host and upload  *
;* two predefined files with ZMODEM.  This is a very basic logon and         *
;* upload script. The script can be edited for download instead of upload if *
;* desired.                                                                  *
;*                                                                           *
;* This ASPECT script is intended only as a sample of ASPECT programming.    *
;* Symantec makes no warranty of any kind, express or implied, including     *
;* without limitation, any warranties of merchantability and/or fitness      *
;* for a particular purpose.  Use of this program is at your own risk.       *
;*                                                                           *
;* Technical Support is not provided on this script.                         *                                                                          *
;*****************************************************************************



;*****************************************************************************
;* MACRO definitions                                                         *
;*****************************************************************************

#define PhoneNum "8,19999999999"            ;Phone Number to dial.
#define LoginID "namehere"             ;Login Name.
#define Password "password"            ;Login Password.

#define FirstFile "c:\First.txt"           ;File to upload.
#define SecondFile "c:\Second.txt"         ;File to upload.

; #define DownloadDir "C:\progra~1\procom~1\download" ;Directory to save the file.


;****************************************************************************
;* Main                                                                     *
;****************************************************************************
proc main

;   set dnldpath DownloadDir            ;Download directory where files are saved.
   dialnumber DATA PhoneNum            ;Dial the specified phone number.
   while $dialing                      ;While dialing the number yield.
      yield
   endwhile
   
   waitfor "FULL Name:"                ;Waitfor login name prompt.
   transmit LoginID                    ;Transmit the login name.
   transmit "^M"                       ;Transmit a CR.
   waitfor "correct (Y/N)?"
   transmit "Y"
   waitfor "Password:"
   transmit Password
   transmit "^M"
   waitfor "Choice?"
   transmit "U"                        ;Select Upload Menu.
   waitfor "choice?"
   transmit "Z"                        ;Select ZMODEM protocol.
   waitfor "name?"
   transmit FirstFile                   ;Transmit the file name to upload.
   transmit "^M"
   waitfor "procedure..."
   pause 1
   
   if isfile FirstFile                    ;Check to see if the file exists.
      sendfile ZMODEM FirstFile           ;Send the file with ZMODEM.
      while $xferstatus                   ;Pause script while transferring file.
         yield
      endwhile
   endif
   if isfile SecondFile                   ;Check to see if the file exists.
      waitfor "Choice?"
      transmit "U"                        ;Select Download Menu.
      waitfor "choice?"
      transmit "Z"                        ;Select ZMODEM protocol.
      waitfor "name?"
      transmit SecondFile                 ;Transmit the file name to upload.
      transmit "^M"
      waitfor "procedure..."
      pause 1
      sendfile ZMODEM SecondFile          ;Send the file with ZMODEM.
      while $xferstatus                   ;Pause script while transferring file.
         yield
      endwhile
   endif
   pause 1
   transmit "G"                        ;Select goodbye.
   hangup                              ;Hangup the phone line.
   clear                               ;Clear the terminal window.
   pause 2
   pwexit                              ;Close Procomm Plus.
endproc




