800.682.0200 | FAX: 360.568.2923 |  About Us  |  Downloads  |  Manuals  |  Home  |  Index

 
 Connectivity Applications
    Javelin Secure 320Pocket320MS3270MS5250MS92 Secure 92Pocket92 MS92/MAC
 
» Minisoft News

» Demo / Updates

FREE Demo
fully functional time-limited

Updates and Add-Ons
Call your salesperson for a password

 

 
 

Example of script file running a menu
to download, copy, or exit

 

 ;Clearing the screen and displaying a 'menu'.
:MENU
    DISPLAY "^[H^[J"
    DISPLAY " ^[&dDPAYROLL DOWNLOAD MENU^M^J" 
    DISPLAY " ^M^J"
    DISPLAY "1. TRANSFER FILES TO YOUR PC ^M^J"
    DISPLAY "2. COPY FILES FROM YOUR PC TO FLOPPY DISK ^M^J"
    DISPLAY "3. EXIT ^M^J"

;Setting the Header and prompt for the Dialog box that will be displayed by 
;the ASK command.
    LET HEADER = "Payroll Download Menu"
    LET PROMPT = "Please Enter Selection: 1, 2, or 3"
    ACCEPT V2 LIMIT 1
    IF V2 = "1"
        GOSUB XFER
    ENDIF
    IF V2 = "2"
        GOSUB COPY
    ENDIF
    IF V2 = "3"
        DISPLAY "^[H^[J"
        STOP
    ENDIF
    GOTO MENU

LABEL COPY
    SHELL "command.com /c copy c:\download\junk.txt a:"
    RETURN

LABEL XFER
;Performing the subroutine LOKALFILE which prompts for the local file name.
;If nothing is entered, the script returns from where it was called.
    GOSUB LOKALFILE
    IF LENGTH(V3) = 0
        RETURN
    ENDIF

;Performing the subroutine HP3KFILE which prompts for the local file name.
;If nothing is entered, the script returns from where it was called.
    GOSUB HP3KFILE
    IF LENGTH(V4) = 0
        RETURN
    ENDIF

;Setting the predefined variables for the DOWNLOAD command.
;The commented out RECEIVE command is an alternate method.
    LOCF V3
    HOSTF V4
    ASCII
    DOWNLOAD
    ; RECEIVE V3 FROM V4 ASCII 

    RETURN

LABEL LOKALFILE
    LET HEADER = "PC File"
    LET PROMPT = "Enter Local File Name:
    ACCEPT V3
    IF LENGTH(V3) = 0
        ASK No file name entered. Try again?
        IFYES LOKALFILE
    ENDIF
    RETURN

LABEL HP3KFILE
    LET HEADER = "HP3000 File"
    LET PROMPT = "Enter HP3000 File Name:
    ACCEPT V4 LIMIT 26
    IF LENGTH(V4) = 0
        ASK No file name entered. Try again?
        IFYES HP3KFILE
    ENDIF

;Clearing the screen then sending a host command to see if the file exists
    DISPLAY "^[H^[J"
    SEND "LISTF " & V4 & ",2"
    WAITS "^Q"

;Grabbing the first 12 characters of the second line on the screen.
;Remember, screen position 1,1 is terminal memory position 0,0.
    LET V5 = SCREENRECT (1,0,1,11)
    IF V5 = "Non-existent"
        ASK "Non-existent File. Try again?
        IFYES HP3KFILE
    ENDIF
    RETURN
END

 

 

Minisoft Inc.  1024 First Street Snohomish, WA 98290  Phone: (800) 682-0200  Fax: (360) 568-2923
 Copyright ©2008 Minisoft, Inc.   
License Agreement