One of the most annoying scripts I have written
(for the users)
Code:
$=setconsole("hide")
$System = CreateObject("Kixtart.System")
;KD START
;************* Form **************
$Form = $System.Form()
$Form.BackColor = 41,5,161
$Form.ControlBox = "False"
$Form.ForeColor = 255,0,0
$Form.Height = 480
$Form.StartPosition = 1
$Form.Text = "Computer Use Agreement"
$Form.Width = 640
;**************************************
;************* TextBox1 **************
$TextBox1 = $Form.Controls.TextBox("", 45, 105, 536, 188)
$TextBox1.FontSize = 12
$TextBox1.Multiline = "True"
;**************************************
;************* Label1 **************
$Label1 = $Form.Controls.Label("", 45, 315, 536, 37)
$Label1.BackColor = 41,5,161
$Label1.FontBold = "True"
$Label1.FontName = "Arial"
$Label1.FontSize = 11
$Label1.ForeColor = 255,255,255
;**************************************
;************* ResponseTextBox **************
$ResponseTextBox = $Form.Controls.TextBox("", 255, 360, 135, 20)
$ResponseTextBox.OnTextChanged = "UserInput()"
;**************************************
;************* Label2 **************
$Label2 = $Form.Controls.Label("Company", 225, 0, 213, 71)
$Label2.BackColor = 41,5,161
$Label2.FontBold = "True"
$Label2.FontItalic = "True"
$Label2.FontName = "Arial"
$Label2.FontSize = 48
$Label2.ForeColor = 255,255,255
;**************************************
;************* Label3 **************
$Label3 = $Form.Controls.Label("Company text line", 165, 75, 345, 19)
$Label3.BackColor = 41,5,161
$Label3.FontBold = "True"
$Label3.FontName = "Arial"
$Label3.ForeColor = 237,46,56
;**************************************
;************* Logoff **************
$Logoff = $Form.Controls.Button("Log Off Computer", 45, 390, 113, 25)
$Logoff.FontBold = "True"
$Logoff.OnClick = "LogoffPC()"
;**************************************
;************* Accept **************
$Accept = $Form.Controls.Button("Accept Agreement", 465, 390, 124, 26)
$Accept.Enabled = "False"
$Accept.FontBold = "True"
$Accept.OnClick = "AcceptClicked()"
;**************************************
;KD END
$Form.FormBorderStyle = 0
$Form.TopMost = "True"
$TextBox1.text= "WARNING! By accessing this system you are consenting to system monitoring " +
"and agreeing to follow the Agency's policies regarding acceptable use, " +
"protection of information resources, and confidential health care information. "+
"Improper or illegal use of this computer may subject you to an investigation " +
"and could result in either disciplinary action in accordance with the Agency's "+
"standards, or possible civil or criminal penalties."
$rtext = "To acknowledge your acceptance of this policy, please "
DIM $randtext[6], $randansw[6]
$randtext[0] = 'enter the last word from the statement above'
$randtext[1] = 'enter the word after "disciplinary"'
$randtext[2] = 'enter the all capitalized word'
$randtext[3] = 'enter the word after "consenting to system __________"'
$randtext[4] = 'enter the missing word from "possible _____ or criminal penalties"'
$randtext[5] = 'enter the missing word from "Improper or _______ use of this computer"'
$randansw[0] = 'penalties'
$randansw[1] = 'action'
$randansw[2] = 'WARNING'
$randansw[3] = 'monitoring'
$randansw[4] = 'civil'
$randansw[5] = 'illegal'
$rc=SRND(@ticks)
$question = rnd(ubound($randtext)-1)
$answer = $randansw[$question]
$Label1.text = $rtext + $randtext[$question]
$Form.Show
While $Form.Visible
$=Execute($Form.DoEvents())
Loop
Exit 1
Function AcceptClicked()
Quit
EndFunction
Function UserInput()
if instr($ResponseTextBox.Text , $answer)
$Accept.Enabled = "True"
else
$Accept.Enabled = "False"
endif
EndFunction
Function LogoffPC()
EndFunction