;---------------------------
;************************************************************************
;***** Safety Tip of the Week *****
;***** If this is set the the ON option, in the place of the *****
;***** username, workstation name, and operating system, a box *****
;***** with the message you specify below will appear. Message is *****
;***** in HTML format. *****
;************************************************************************
$SafetyTipStatus = "" ;Set to either ON or nothing (Case sensitive).
$TipOWeekText = "<center>Safety Tip of the Week:</center>When hiking, know the terrain, water sources, expected weather, and animals in the area. Wear proper hiking boots or shoes, use insect repellant, carry extra food and water, stay hydrated and carry a phone or radio. Don't go alone. Make sure someone knows where you plan to go."
$TipOWeekColor = "#FF6600"
;************************************************************************
;***** Function for GUI Interface *****
;************************************************************************
Function DrawForms()
$SCRIPTPATH = "\\servername\somepath"
; Form
$IE = CreateObject("internetexplorer.application")
If $SafetyTipStatus = "ON"
$IE.Navigate("$SCRIPTPATH\GUI-form\logon2.htm")
$IE.Height = "590"
Else
$IE.Navigate("$SCRIPTPATH\GUI-form\logon.htm")
$IE.Height = "550"
EndIf
WHILE $IE.Busy LOOP
$IE.Document.Title = "Security Scanner"
$IE.Width = "610"
;$IE.Left = ($IE.Document.parentWindow.screen.availWidth / 2) - ($IE.Width / 2) ;Doesn't work with Vista
;$IE.Top = ($IE.Document.parentWindow.screen.availHeight / 2) - ($IE.Height / 2) ;Doesn't work with Vista
$IE.ToolBar = $False
$IE.AddressBar = $False
$IE.MenuBar = $False
$IE.StatusBar = $False
$IE.Resizable = $False
$IE.Visible = $True
$IE.Document.parentWindow.focus();
$FullName = $IE.Document.getElementByID("FullName")
$WKSTA = $IE.Document.getElementByID("WKSTA")
$ProductType = $IE.Document.getElementByID("ProductType")
$TipOWeek = $IE.Document.getElementByID("TipOWeek")
$INFOFPCON = $IE.Document.getElementByID("INFOFPCON")
$TCNO = $IE.Document.getElementByID("TCNO")
$ProgressText = $IE.Document.getElementByID("ProgressText")
$Progress = $IE.Document.getElementByID("Progress")
EndFunction
;************************************************************************
;***** Begin printing info to GUI *****
;************************************************************************
;Default Settings
$progressstep=2
$sleeptime = 0
$numerrors = 0
$TRUE = 1
$FALSE = 0
; Draw Form
DrawForms()
;$FPCONString = Replace($FPCONPRINT, CHR(13), "<br>")
;$INFOCONString = Replace($INFOCONPRINT, CHR(13), "<br>")
;$INFOFPCON.InnerHTML = "$FPCONString <br> $INFOCONString"
$FullName.InnerTEXT = "@FULLNAME"
$WKSTA.InnerTEXT = "@WKSTA"
$ProductType.InnerTEXT = "@ProductType"
$TipOWeek.InnerHTML = '<div id=blinky>$TipOWeekText</div>'
;$ie.document.getElementById("TipOWeek").value = $TipOWeek
$INFOFPCON.InnerTEXT = "Test Information1"
$ProgressText.InnerTEXT = "Test Information1"