Quote:

Did you insert the messagebox command between your next and your exit. Or did you just copy and paste the whole thing into your script? I geuss I was not very specific as to how to do it.

I use messagebox along with KF with no problems.




Yes I have used cut and paste, and still the same




Quote:

Quote:

Ok that is what I get for cut and paste....
And yea that would be a KiX on top of a KF script. My bad, but it would still work.....



Hmmm... cut and paste gives me an error.

The form should be redesigned to use the KiXforms built-ins to display whatever message on the main form before the progress bar starts. That way users can read the message while waiting for the script to complete.





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.