Vig,

Try this version. In order for this to work, you have to silence all your function calls because the $= assigns are messing-up the evaluations.

Normally this isn't a problem, but i think because the string is being evaluated twice (once in the execute, and again in the assign) - things are getting hairy - sure you don't want to go for the control array approach ? [Wink]

Jochen wrote a script that uses this strategy quite a bit, I'm hoping he can step in and explain better what is going on. In the meantime, I've silenced your functions, changed the onclick assign, and modified your click function, try this one:

code:
break on

$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)

do
$n=execute(' $$$var = $$form.CheckBox("$var") ')
$n=execute(" $$$var.Left= 10")
$n=execute(" $$$var.TabStop= 0")
$n=execute(" $$$var.Top= $Topdistance")
$n=execute(' $$$var.OnClick= "chkAccountDisabled_Click('+'$$$'+'$var)"')
$n=execute(" $$$var.Enabled= 1")
$n=execute(" $$$var.Value= 1")
$Topdistance = $topdistance + 20
$var = readline(1)
until $var = ""
$n=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($var)

If $var.Value = 0

? $var.caption + " was not checked"

Else

? $var.caption + " was checked"

EndIf
EndFunction

By the way, what version of Kixtart are your using ? What version of Kixforms ? To determine the Kixforms version, start a form then click the Window Title title close box (top left) - then click "About Kixforms..." ...

-Shawn

[ 10 May 2002, 23:55: Message edited by: Shawn ]