Indexing 是否在.nsh头文件中使用节索引?

Indexing 是否在.nsh头文件中使用节索引?,indexing,nsis,Indexing,Nsis,正如问题所说:我正在尝试使用.nsh文件中的节索引,该文件配置页面并包含自定义页面。 我正试图用函数SectionSetInstTypes实现这一点 当我尝试使用SectionGetInstTypes获取INST类型时,它不起作用,输出总是7 这是我在inst类型的头文件中的代码: *SectionSetInstTypes${Section2}1 SectionGetInstTypes${Section2}$R4 messagebox mb_ok“$R4”* 在.nsh文件中是否没有或有可能获取

正如问题所说:我正在尝试使用.nsh文件中的节索引,该文件配置页面并包含自定义页面。 我正试图用函数SectionSetInstTypes实现这一点

当我尝试使用SectionGetInstTypes获取INST类型时,它不起作用,输出总是7

这是我在inst类型的头文件中的代码:

*SectionSetInstTypes${Section2}1 SectionGetInstTypes${Section2}$R4 messagebox mb_ok“$R4”*


在.nsh文件中是否没有或有可能获取索引?

NSIS并不真正关心代码是在.nsh还是在main.nsi中,但是节索引仅在节之后有效

Section
SectionGetText ${mysec} $0 ;will generate compiler warning
DetailPrint $0 ;$0 is ""
SectionEnd

Section "Hello" mysec
SectionEnd

Section
SectionGetText ${mysec} $0
DetailPrint $0
SectionEnd

所以你的部分需要在你的上面!包括在你的.nsi中…

谢谢,我还没想过!但这使得在运行时更改InstType更加困难。一个标志将完成此工作:)