PDA

View Full Version : Help what do i wrong?


yuppie1000
09-03-2009, 08:16 AM
when setup strarts i give the user 2 options with radio buttuns.

What i really want is that if user choose 1 only one .xls file will be instelled etc.

I don't have a clue how to do that.

anoter possibility install them both, and delete the one that was'nt selected.

This is my code


-- Convert the selected radio button control to a number for the comparison.
nSelectedControl = String.ToNumber(SessionVar.Expand("%RadioSelection%"));

-- Check to see which radio button was selected by comparing the selected radio button and each raido button control ID.
if (nSelectedControl == CTRL_RADIO_BUTTON_01) then
Dialog.Message("Radio Buttons", "Optie 1", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
-- File.Delete("C:\\Program Files\\Offerteberekeningen\\Offerteberekeningen-DA.xls", false, false, false, nil);
-- File.delete("%AppFolder%) \\Offerteberekeningen-DA.xls", false, false, false, nil);


elseif (nSelectedControl == CTRL_RADIO_BUTTON_02) then
Dialog.Message("Radio Buttons", "Optie 2", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
File.Delete("C:\\Program Files\\Offerteberekeningen\\Offerteberekeningen-Handelsbedrijven.xls", false, false, false, nil);

end

Screen.Next();


That works a little bit.

File.Delete("C:\\Program Files\\Offerteberekeningen\\Offerteberekeningen-DA.xls", false, false, false, nil);

This one works (but is useless)

file.delete("%AppFolder%) \\Offerteberekeningen-DA.xls", false, false, false, nil);

And this one not!

Can anybody help?

yuppie1000
09-03-2009, 11:39 AM
i check in the properties i select script condition with:


CTRL_RADIO_BUTTON_02 == String.ToNumber(SessionVar.Expand("%RadioSelection%"));


as code and works perfect!


so promblem solved.