获取单选按钮值[INNO SETUP]

巴图汉B

我正在尝试在Inno Setup中创建一个新窗口。在此窗口中:

  • 应该有5个单选按钮
  • 用户只能选择此选项之一
  • 当用户单击下一步按钮时,我必须获取并保存单选按钮的值(在某处?),并将此值提供给带有参数的批处理文件(将运行)
  • 我想我应该在NextButtonClick的功能中执行一些操作,但是我无法弄清楚如何达到单选按钮的值并保存。

任何帮助表示赞赏。

该窗口的屏幕截图:

在此处输入图片说明

所以现在,我的代码如下:

    #define MyAppName "CDV  Client"
    #define MyAppVersion "3.6.1 build 2"
    #define MyAppPublisher " CDV"
    #define MyAppURL "https://example-cm-1"
    #define MyAppExeName "example.exe"


    [Setup]
    AlwaysUsePersonalGroup=true
    ; NOTE: The value of AppId uniquely identifies this application.
    ; Do not use the same AppId value in installers for other applications.
    ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
    AppID={{7C9325AD-6818-42CA-839E}
    AppName={#MyAppName}
    AppVersion={#MyAppVersion}
    ;AppVerName={#MyAppName} {#MyAppVersion}
    AppPublisher={#MyAppPublisher}
    AppPublisherURL={#MyAppURL}
    AppSupportURL={#MyAppURL}
    AppUpdatesURL={#MyAppURL}
    DefaultDirName={code:DriveLetter}:\Tool\CDVClient
    DefaultGroupName=Ser
    AllowNoIcons=true
    OutputBaseFilename=CDVClient_setup
    Compression=lzma/Max
    SolidCompression=true
    SetupLogging=true
    PrivilegesRequired=none
    DirExistsWarning=yes
    AlwaysShowDirOnReadyPage=true
    AlwaysShowGroupOnReadyPage=true

    [Code]
    function DriveLetter(Param: String): String;
    begin
      if DirExists('d:\') then
        Result := 'D'
      else if DirExists('e:\') then
        Result := 'E'
      else
        Result := 'C'
    end;

    var
      CDVRadioButton: TNewRadioButton;
      ISCRadioButton: TNewRadioButton;
      TestRadioButton: TNewRadioButton;
      Test2RadioButton: TNewRadioButton; 
      Test3RadioButton: TNewRadioButton;  
      lblBlobFileFolder: TLabel;

    procedure InitializeWizard;
    var  
      LabelFolder: TLabel;  
      MainPage: TWizardPage;  
      FolderToInstall: TNewEdit;  

    begin
      MainPage := CreateCustomPage(wpWelcome, 'Deneme', 'Deneme2');
      LabelFolder := TLabel.Create(MainPage);
      LabelFolder.Parent := WizardForm;
      LabelFolder.Top := 168;
      LabelFolder.Left := 6;
      LabelFolder.Caption := 'Directory:'

      lblBlobFileFolder :=  TLabel.Create(MainPage);
      lblBlobFileFolder.Parent := MainPage.Surface;
      lblBlobFileFolder.Top := LabelFolder.Top - 160;
      lblBlobFileFolder.Left := LabelFolder.Left;
      lblBlobFileFolder.Width := LabelFolder.Width * 5;
      lblBlobFileFolder.Caption := 'Please select the convenient extension ';

      CDVRadioButton := TNewRadioButton.Create(MainPage);
      CDVRadioButton.Parent := MainPage.Surface;
      CDVRadioButton.Top := LabelFolder.Top - 120;
      CDVRadioButton.Left := LabelFolder.Left;
      CDVRadioButton.Width := LabelFolder.Width * 5;
      CDVRadioButton.Caption := 'CDV';
      CDVRadioButton.Checked := true;

      ISCRadioButton := TNewRadioButton.Create(MainPage);
      ISCRadioButton.Parent := MainPage.Surface;
      ISCRadioButton.Top := LabelFolder.Top - 80;
      ISCRadioButton.Left := LabelFolder.Left;
      ISCRadioButton.Width := LabelFolder.Width * 5;
      ISCRadioButton.Caption := 'ISC';

      TestRadioButton := TNewRadioButton.Create(MainPage);
      TestRadioButton.Parent := MainPage.Surface;
      TestRadioButton.Top := LabelFolder.Top - 40;
      TestRadioButton.Left := LabelFolder.Left;
      TestRadioButton.Width := LabelFolder.Width * 5;
      TestRadioButton.Caption := 'Test1';

      Test2RadioButton := TNewRadioButton.Create(MainPage);
      Test2RadioButton.Parent := MainPage.Surface;
      Test2RadioButton.Top := LabelFolder.Top ;
      Test2RadioButton.Left := LabelFolder.Left;
      Test2RadioButton.Width := LabelFolder.Width * 5;
      Test2RadioButton.Caption := 'Test2';

      Test3RadioButton := TNewRadioButton.Create(MainPage);
      Test3RadioButton.Parent := MainPage.Surface;
      Test3RadioButton.Top := LabelFolder.Top + 40;
      Test3RadioButton.Left := LabelFolder.Left;
      Test3RadioButton.Width := LabelFolder.Width * 5;
      Test3RadioButton.Caption := 'Test3';
    end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
// I should do something in here but what ? :/
end;

    [Languages]
    Name: "english"; MessagesFile: "compiler:Default.isl"

    [Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
    Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; OnlyBelowVersion: 0,6.1

    [Files]
    ; add recursesubdirs
    Source: "C:\Program Files\Inno Setup 5\Examples\batu.bat"; DestDir: "{app}"; Flags:  overwritereadonly recursesubdirs
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files

    [Icons]
    Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
    Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
    Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
    Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
    Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon

    [Run]
    Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, "&", "&&")}}"; Flags: nowait postinstall skipifsilent
亚历克斯

您可以检查单选按钮的“已检查”属性,以查看选择了哪个:

if (CDVRadioButton.Checked) then
begin
   Do stuff...
end
else if (ISCRadioButton.Checked) then
begin
   Do some other stuff...
end;

高温超导

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

c# setup project 获取单选按钮值

来自分类Dev

Inno Setup-如何根据单选按钮跳过文件

来自分类Dev

Inno Setup:如何使用单选按钮和表单创建页面

来自分类Dev

在Inno Setup中按字体大小缩放单选按钮列表

来自分类Dev

Inno Setup:如何使用单选按钮而不是下拉列表将组件显示为列表?

来自分类Dev

为什么在Inno Setup中未选中自定义页面上的单选按钮?

来自分类Dev

Inno Setup-如果选择了“我不接受”单选按钮,则会显示消息

来自分类Dev

Inno Setup:禁用TInputOptionWizardPage的单选按钮看起来已部分启用(错误?)

来自分类Dev

wpFinished页面上的Inno Setup替换按钮

来自分类Dev

阻止按钮在Inno Setup中获得焦点

来自分类Dev

在Inno Setup中,是否可以创建一个在单选按钮内包含输入文件小工具的页面?

来自分类Dev

我可以在Inno Setup的同一“ CreateInputOptionPage”页面上使用复选框和单选按钮吗?

来自分类Dev

Inno Setup获取默认浏览器

来自分类Dev

获取单选按钮值

来自分类Dev

获取单选按钮的“ on”值

来自分类Dev

Inno Setup语法-OR,AND

来自分类Dev

Inno Setup中的TTreeView

来自分类Dev

如何在Inno Setup中创建图像按钮?

来自分类Dev

Inno Setup 在输入无效时禁用 Next 按钮

来自分类Dev

如何获取单选按钮的值?

来自分类Dev

获取单选按钮选择值

来自分类Dev

获取检查的单选按钮值

来自分类Dev

获取检查的单选按钮值

来自分类Dev

获取单选按钮值php

来自分类Dev

Inno Setup:如何获取引发异常的异常代码?

来自分类Dev

Inno Setup-获取父文件夹的路径

来自分类Dev

Inno Setup-不获取环境变量

来自分类Dev

Inno Setup 在事件处理程序中获取 TObject 类型/类

来自分类Dev

inno setup中的“ Not in a loop”错误

Related 相关文章

  1. 1

    c# setup project 获取单选按钮值

  2. 2

    Inno Setup-如何根据单选按钮跳过文件

  3. 3

    Inno Setup:如何使用单选按钮和表单创建页面

  4. 4

    在Inno Setup中按字体大小缩放单选按钮列表

  5. 5

    Inno Setup:如何使用单选按钮而不是下拉列表将组件显示为列表?

  6. 6

    为什么在Inno Setup中未选中自定义页面上的单选按钮?

  7. 7

    Inno Setup-如果选择了“我不接受”单选按钮,则会显示消息

  8. 8

    Inno Setup:禁用TInputOptionWizardPage的单选按钮看起来已部分启用(错误?)

  9. 9

    wpFinished页面上的Inno Setup替换按钮

  10. 10

    阻止按钮在Inno Setup中获得焦点

  11. 11

    在Inno Setup中,是否可以创建一个在单选按钮内包含输入文件小工具的页面?

  12. 12

    我可以在Inno Setup的同一“ CreateInputOptionPage”页面上使用复选框和单选按钮吗?

  13. 13

    Inno Setup获取默认浏览器

  14. 14

    获取单选按钮值

  15. 15

    获取单选按钮的“ on”值

  16. 16

    Inno Setup语法-OR,AND

  17. 17

    Inno Setup中的TTreeView

  18. 18

    如何在Inno Setup中创建图像按钮?

  19. 19

    Inno Setup 在输入无效时禁用 Next 按钮

  20. 20

    如何获取单选按钮的值?

  21. 21

    获取单选按钮选择值

  22. 22

    获取检查的单选按钮值

  23. 23

    获取检查的单选按钮值

  24. 24

    获取单选按钮值php

  25. 25

    Inno Setup:如何获取引发异常的异常代码?

  26. 26

    Inno Setup-获取父文件夹的路径

  27. 27

    Inno Setup-不获取环境变量

  28. 28

    Inno Setup 在事件处理程序中获取 TObject 类型/类

  29. 29

    inno setup中的“ Not in a loop”错误

热门标签

归档