;************************************************************
;** Script: Login Splash Screen
;** Version: 2.1
;** Created: June 04, 2000 - 09:14 PM
;**
;** Author: Ben Burnett
;** E-mail: BenBurnett@telusplanet.net
;**
;** Purpose / Comments:
;**
;** Show the user something nice while they are loged in.
;**
;** Original splash screen code - Ruud van Velsen
;**
;** Ben Burnett
;** - Oct/29/99 - Added Debug information
;** - Oct/29/99 - Added Company name banner
;** - Oct/31/99 - Added progress bar
;** - June/4/2000 - Minor enhancement to debug system
;**
;************************************************************

;************************************************************
;** Script Debuging
;**
;** On the command line define "$DEBUG=1" to get a
;** more detailed output. (Without quotes)
;**

;************************************************************
;** Common defines
;**

$TRUE = 1
$FALSE = 0

;************************************************************
;** Globals
;**

; Your institutions name goes here
$Title = "Version Zero Software Network Login"

;************************************************************
;** Script Start
;**

; Turn break on

Break On

; Start of Script
:MAIN

; Signal start of script
If $DEBUG = $TRUE
"*** Start of Script ***" ? ?
EndIf

; Set output to ASCII
Dim $PreviousASCIIState
$PreviousASCIIState = SetASCII ("ON")

; Clear the screen
Cls

; Show the splash screen
Gosub SPLASH_SCREEN

; Progress meter init
; NOTE: A Full bar is 34
$Progress = 0
$AjustProgress = 0

;
; Do something...
;

Sleep 1

; Update progress bar
$AjustProgress = 10 ; add 10 blocks
Gosub DRAW_PROGRESS

;
; Do something else...
;

Sleep 1

; Update progress bar
$AjustProgress = 10 ; add 10 more blocks
Gosub DRAW_PROGRESS

;
; Do something else, again...
;

Sleep 1

; Update progress bar
$AjustProgress = 14 ; were done
Gosub DRAW_PROGRESS

;********************************************
; The next few lines is only there so that you can
; actualy see the demo screen, in an actual login
; script you probably would'nt have them there
;
If $DEBUG = $TRUE

Color W+/N
At (16,28) "Press any key to continue."
Get $X

EndIf
;********************************************

; Reset the output mode
$X = SetASCII ($PreviousASCIIState)

; Clear the screen again
Cls

; Signal end of script
If $DEBUG = $TRUE

? ? "*** End of Script ***"

EndIf

Exit ; Quit

;************************************************************
;** Script Subroutines ( GOSUBs )
;**

; Draw screen information
:SPLASH_SCREEN

; Background grid
Color B+/N
Box (0, 0, 24, 79, GRID)

; Title banner
Color B/N
Box (3, 3, 5, Len ($Title + 8) + 5, Å) ; shadow
Color G+/N
Box (2, 2, 4, Len ($Title + 8) + 4, FULL) ; box

; Information box
Color B/N
Box (8, 21, 18, 61, Å) ; shadow
Color G+/N
Box (7, 20, 17, 60, FULL) ; box

; Draw the progress bar
Color B/N
Box (20, 21, 22, 61, Å) ; shadow
Color G+/N
Box (19, 20, 21, 60, FULL) ; box

; Center the title on the screen
Color Y+/N
At ( 3, 4) $Title

; Display some text strings
Color W+/N
At ( 9, 25) "Userid : "
At (10, 25) "Full name : "
At (11, 25) "Privilege : "
At (12, 25) "Workstation : "
At (13, 25) "Domain : "
At (14, 25) "Logon Server : "

; ...and some macro's
Color Y+/N
At ( 9, 40) @USERID
At (10, 40) @FULLNAME
At (11, 40) @PRIV
At (12, 40) @WKSTA
At (13, 40) @DOMAIN
At (14, 40) @LSERVER

Return

; Draw progress bar
RAW_PROGRESS

; Setup progress bar ajustment
$AjustProgress = $Progress + $AjustProgress

; Bump progress up
While $Progress <= $AjustProgress

; Diplay curent progress
Color Y+/N
At (20, 22 + $Progress) Chr (219)
$Progress = $Progress + 1

Loop

Return