Kixform release 11
Kixtart ver 4.00
I tried your script and it worked great. I'm going to take a look at the changes here in a minute.
Over the past couple hours I was working on a solution and this is what I came up with.
code:
;Script test.kix
$Form = CreateObject("Kixtart.Form")
$Form.Caption = "Insatll Stuff"
$Form.ScaleHeight = 300
$Form.ScaleWidth = 250
$Form.FontName = "Arial"
$Form.FontSize = 9
$Form.Center
$Topdistance = 20
$nul = open(1,test.dat,2)
$var = readline(1)
$counter = 1
do
$=execute(' $$$var = $$form.CheckBox("$var") ')
$=execute(" $$$var.Left= 10")
$=execute(" $$$var.TabStop= 0")
$=execute(" $$$var.Top= $Topdistance")
$=execute(' $$$var.OnClick= "chkAccountDisabled_Click($counter)"')
$=execute(" $$$var.Enabled= 1")
$=execute(" $$$var.Value= 1")
$Topdistance = $topdistance + 20
$var = readline(1)
$counter = $counter + 1
until $var = ""
$=close(1)
$cmdExit = $form.CommandButton("Install!")
$cmdExit.FontSize = 12
$cmdExit.FontBold = 1
$cmdExit.Top = 250
$cmdExit.Width = 100
$cmdExit.Left = 75
$cmdExit.OnClick = "Return_to_script()"
$Form.Show
While $quit <> 1 and $Form.Visible
$=Execute($Form.DoEvents)
Loop
Function chkAccountDisabled_Click($counter)
If $counter <> 0
$=open(1,test.dat,2)
$counter2 = 0
do $var=readline(1)
$counter2 = $counter2 + 1
until $counter = $counter2
$=close(1)
Else $counter = 0
? "Error in counter"
EndIf
If $$$var.value = 0 ;<---------------------------------------------------------------- HERE
? "$var Checkbox was not checked"
Else
? "$var Checkbox was checked"
EndIf
EndFunction
Function Return_to_script()
$quit = 1
EndFunction
I've got everything working they way it should ($var even = the checkbox selected), but theres one line I just cant get to work right. It's one of the simple ones to but I've played around with it and I can't get to to work. It's the line marked HERE in the code.
It's got to be the syntax because the value of $var is the box selected.
BTW what is the control array approach?
Thanks