;************************************************************ ;** Script: Login Splash Screen ;** Version: 2.2 ;** Created: Monday - October 9, 2000 ;** ;** 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 $Progress = 0 $FullProgress = 38 ; 38 is a 'full' bar $ProgressPrompt = "Loging in..." Gosub DRAW_PROGRESS ; ; Connect network resources ; If InGroup ("Administrators") = 2 ; Tell the user what were up to $ProgressPrompt = "Connecting network resources..." Gosub DRAW_PROGRESS ; Connect up some drives Use "F:" "\\SOME-SERVER\D" /Persistent Use "G:" "\\SOME-OTHER-SERVER\E" /Persistent ; Update progress bar $Progress = 10 Gosub DRAW_PROGRESS EndIf Sleep 1 ; Update progress bar $Progress = 20 Gosub DRAW_PROGRESS Sleep 1 ; Update progress bar $Progress = 30 Gosub DRAW_PROGRESS ; ; TODO: Enter your script here ; ;******************************************** ; 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 (institutions name) 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 ; Display the institutions name Color Y+/N At ( 3, 4 ) $Title ; Information box Color B/N Box ( 8, 21, 18, 61, Å ) ; shadow Color G+/N Box ( 7, 20, 17, 60, FULL ) ; box ; 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 ; Draw the progress bar Color B/N Box ( 20, 20, 23, 62, Å ) ; shadow Color G+/N Box ( 19, 19, 22, 61, FULL ) ; box Color B/N Box ( 20, 20, 21, 60, Å ) ; fill box Return ; Draw progress bar ; NOTE: This will flicker a bit because were re-drawing everithing. :DRAW_PROGRESS ; Find the center of the screen and offset by the progress prompts length $YCordinate = 40 - ( Len ( $ProgressPrompt ) / 2 ) ; Clear any previous progress prompt text and bar Color B/N Box ( 20, 20, 21, 60, Å ) ; erase ; Display progress prompt Color W+/N At ( 20, $YCordinate ) $ProgressPrompt ; Redraw entire progress bar up to new value Color Y+/N Dim $Count $Count = 0 While $Count <= $Progress At ( 21, 21 + $Count ) Chr ( 219 ) ; solid block $Count = $Count + 1 Loop Return