After quite bit of testing I I've come to the following result:
Code:
Break On CLS ;- Remove CLS if using WKIX32
$nul=SetConsole("Hide") ;- Hide console when script is done
;------------------------Function
$FuncToExecute=Split("fnScrFunc1,fnScrFunc2,fnScrFunc3,fnScrFunc4,fnScrFunc5,fnScrFunc6",",")
$System = CreateObject("Kixtart.System")
If Not $System
$= MessageBox("KiXforms Not Initiated. This Script Will Now Close.","Error",16)
Quit()
EndIf
;-------------------------Making Form
$Root = $System.Form()
$frmMain = $System.Form($Root)
$frmMain.TopMost = "True"
$frmMain.Size = 560,410
$frmMain.SysMenu = 1
$frmMain.Text = "Logging in..."
$frmMain.BackColor = 114, 125, 157
$picture = $frmMain.controls.Picturebox ("", 25, 25, 499, 340)
$picture.picture = "esj.bmp"
$picture.BorderStyle = 0
;----------------------------Tekst functie
$ProgressTextBox = $picture.Label
$ProgressTextBox.BackColor = 187, 192, 213
$ProgressTextBox.bounds = 10, 220, 480, 20
$ProgressTextBox.forecolor = 255, 255, 255
$ProgressTextBox.fontsize = 12
$ProgressTextBox.fontbold = true
$ProgressTextBox.FontName = Tahoma
$ProgressTextBox.TextAlign = MiddleCenter
$ProgressBar = $picture.ProgressBar()
$ProgressBar.Left = $ProgressTextBox.Left
$ProgressBar.Top = $ProgressTextBox.Bottom + 10
$ProgressBar.Width = $ProgressTextBox.Width
$ProgressBar.Height = $ProgressTextBox.Height
$ProgressTextBox1 = $picture.Label
$ProgressTextBox1.BackColor = 187, 192, 213
$ProgressTextBox1.bounds = 10, 20, 480, 100
;$ProgressTextBox1.forecolor = 255, 255, 255
;$ProgressTextBox1.fontsize = 12
;$ProgressTextBox1.fontbold = true
;$ProgressTextBox1.FontName = Tahoma
;$ProgressTextBox1.TextAlign = MiddleCenter
;-------------------------Script functies uitvoeren
$frmMain.Center
$frmMain.Show
;$prgStatus.Max = Ubound($FuncToExecute)+1
For Each $sFunction in $FuncToExecute
;$prgStatus.Value = $prgStatus.Value+1
$nul=Execute($sFunction)
Sleep 1
Next
Exit()
;-------------------------Functies
Function fnScrFunc1()
$ProgressTextBox.text = "Your message"
$ProgressBar.Value = $ProgressBar.Value + 16
Sleep 1
EndFunction
Function fnScrFunc2()
$ProgressTextBox.text = "Change This Computer Name"
$ProgressBar.Value = $ProgressBar.Value + 16
Sleep 1
EndFunction
Function fnScrFunc3()
$ProgressTextBox.text = "Change Network Drive Icons"
$ProgressBar.Value = $ProgressBar.Value + 16
Sleep 1
EndFunction
Function fnScrFunc4()
$ProgressTextBox.text = "Set the correct domain time"
$ProgressBar.Value = $ProgressBar.Value + 16
SetTime "\\SSC01"
EndFunction
Function fnScrFunc5()
$ProgressTextBox.text = "Set some internet favorites"
$ProgressBar.Value = $ProgressBar.Value + 16
Sleep 1
EndFunction
Function fnScrFunc6()
$ProgressTextBox.text = "Logonscript complete. Thank you."
$ProgressBar.Value = 100
Sleep 1.5
EndFunction
Next
$nul = MessageBox("Test_message","Test_title",64)
Exit()
I've added:
$ProgressTextBox1 = $picture.Label
$ProgressTextBox1.BackColor = 187, 192, 213
$ProgressTextBox1.bounds = 10, 20, 480, 100
;$ProgressTextBox1.forecolor = 255, 255, 255
;$ProgressTextBox1.fontsize = 12
;$ProgressTextBox1.fontbold = true
;$ProgressTextBox1.FontName = Tahoma
;$ProgressTextBox1.TextAlign = MiddleCenter
The last five are unimportant
and added
Code:
$ProgressTextBox1.text = "your text"
within Function fnScrFunc1()
Now you'll see your message above the login bar.