Vig,

Just so that you can compare, here's a very quick and dirty conversion into the control array approach. Not sure if you agree, but (I) think its a little easier on the eyes (and the noggin) ...

The data file is an INI file like this:

[TEST.INI]

code:
[item1]

[item2]

[item3]

[item4]

[item5]

and the script:

code:
break on

$profile = ".\test.ini"

$form = createobject("kixtart.form")

$form.caption = "Install Stuff"
$form.scaleheight = 300
$form.scalewidth = 250
$form.fontname = "Arial"
$form.fontsize = 9
$form.center

$topdistance = 20

global $checkboxes[20]

$i = 0
for each $item in split(readprofilestring($profile,"",""),CHR(10))
if $item
$checkboxes[$i] = $form.checkbox($item,10,$topdistance)
$checkboxes[$i].tabstop = 0
$checkboxes[$i].value = 1
$checkboxes[$i].onclick = "checkbox_click($$checkboxes[$i])"
$topdistance = $topdistance + 20
$i=$i+1
endif
next

if $i
redim preserve $checkboxes[$i-1]
endif

$list = $form.commandbutton("List all checkboxes",25,200,200,25)
$list.fontsize = 12
$list.fontbold = 1
$list.onclick = "list_checkboxes()"

$exit = $form.commandbutton("Install!")
$exit.fontsize = 12
$exit.fontbold = 1
$exit.top = 250
$exit.width = 100
$exit.left = 75
$exit.onclick = "Return_to_script()"

$form.show

while not $quit and $form.visible
$=execute($form.doevents)
loop

exit 1

function checkbox_click($checkbox)
if $checkbox.value
? $checkbox.caption " is checked"
else
? $checkbox.caption " is not checked"
endif
endfunction

function list_checkboxes
for each $checkbox in $checkboxes
? $checkbox.caption " = " $checkbox.value
next
endfunction

function return_to_script()
$quit = 1
endfunction

Hope this helps!

-Shawn

[ 11 May 2002, 03:13: Message edited by: Shawn ]