cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
ARETI052
Level II

Check box won't show up in an input prompt input

// New dialog for script selection
scripts = {"Box Plot", "Box Plot_sublot_trend", "Box Plot_duration_trend", "Box Plot_FT1vsFT2", "Tabulation", "CDF&PDF11"};
scriptSelections = J(1, N Items(scripts), 0);

// Initialize the checkboxes array
cb = {};

nw2 = New Window("Script Selection", <<modal,
    <<onClose(
        For(i = 1, i <= N Items(scripts), i++,
            scriptSelections[i] = cb[i] << Get;
        );
    ),
    VListBox(
        Text Box("Select the scripts to run:"),
        Panel Box("Scripts",
            V List Box(
                For(i = 1, i <= N Items(scripts), i++,
                    cb[i] = Check Box(scripts[i], 0);
                )
            )
        ),
        HListBox(
            Button Box("OK", nw2 << Close(1)),
            Spacer Box(size(6, 0)),
            Button Box("Cancel", nw2 << Close(0))
        )
    )
);

if (nw2["Button"] == -1, throw());

selectedScripts = {};

For(i = 1, i <= N Items(scripts), i++,
    If(scriptSelections[i] == 1,
        Insert Into(selectedScripts, scripts[i]);
    );
);

New Window("My report",
    VListBox(
        MyGraph(::yColName, ::xColName, ::xGroupName)
    )
);

// Include selected scripts
For(i = 1, i <= N Items(selectedScripts), i++,
    Include(selectedScripts[i] || ".jsl");
);

So I have several sub scripts for my main script to call, I wanted to create a checkbox where the user can select which sub scripts to run (from Box Plot", "Box Plot_sublot_trend", "Box Plot_duration_trend", "Box Plot_FT1vsFT2", "Tabulation", "CDF&PDF11.) But no matter what I do I only get an empty window with the line " Select Scripts to run".

How can I solve this? Thanks!

0 REPLIES 0