помогите мне объеденить эти 2 скрипта в один
читать дальше »
Код:

[....code]
function OnShouldSkipPage(Sender: TWizardPage): Boolean;
begin
if WizardForm.ComponentsList.Items.Count > 0 then WizardForm.Tag:= 1; // отображаются страницы выбора папки и компонентов
end;
Procedure CurPageChanged(CurPageID: Integer);
Begin
Case CurPageID of
wpSelectDir: if WizardForm.Tag = 1 then
begin
WizardForm.SelectDirPage.Notebook.ActivePage:= WizardForm.SelectComponentsPage;
WizardForm.PageNameLabel.Caption:= SetupMessage(msgWizardSelectComponents)
WizardForm.Hint:= WizardForm.PageDescriptionLabel.Caption; // запомнить SetupMessage(msgSelectDirDesc)
WizardForm.PageDescriptionLabel.Caption:= SetupMessage(msgSelectComponentsDesc)
end;
wpSelectComponents: if WizardForm.Tag = 1 then
begin
WizardForm.SelectComponentsPage.Notebook.ActivePage:= WizardForm.SelectDirPage;
WizardForm.DiskSpaceLabel.Caption:= WizardForm.ComponentsDiskSpaceLabel.Caption;
WizardForm.PageNameLabel.Caption:= SetupMessage(msgWizardSelectDir)
WizardForm.PageDescriptionLabel.Caption:= WizardForm.Hint // иначе вместо названия программы [name]
end;
end;
End;
Procedure InitializeWizard;
Begin
PageFromID(wpSelectDir).OnShouldSkipPage:= @OnShouldSkipPage
end;
читать дальше »
Код:

procedure CurPageChanged(CurPageID: Integer);
begin
case CurPageID of
wpSelectDir:
begin
if IsComponentSelected('AIDA641') then WizardForm.DirEdit.Text := AddBackslash(ExpandConstant('{#SetupSetting("DefaultDirName")}')) + '{#AIDA641}'
else WizardForm.DirEdit.Text := ExpandConstant('{#SetupSetting("DefaultDirName")}');
if IsComponentSelected('AIDA642') then WizardForm.DirEdit.Text := AddBackslash(ExpandConstant('{#SetupSetting("DefaultDirName")}')) + '{#AIDA642}'
else WizardForm.DirEdit.Text := ExpandConstant('{#SetupSetting("DefaultDirName")}');
end;
wpSelectProgramGroup:
begin
if IsComponentSelected('AIDA641') then WizardForm.GroupEdit.Text := AddBackslash(ExpandConstant('{#SetupSetting("DefaultGroupName")}')) + '{#AIDA641}'
else WizardForm.GroupEdit.Text := ExpandConstant('{#SetupSetting("DefaultGroupName")}');
if IsComponentSelected('AIDA642') then WizardForm.GroupEdit.Text := AddBackslash(ExpandConstant('{#SetupSetting("DefaultGroupName")}')) + '{#AIDA642}'
else WizardForm.GroupEdit.Text := ExpandConstant('{#SetupSetting("DefaultGroupName")}');
end ;
end;
end;