NSIS 輸入對話盒 (GOOGLE: nsis inputbox)

NSIS 輸入對話盒 (GOOGLE: nsis inputbox)

NSIS 輸入對話盒 (GOOGLE: nsis inputbox)


資料來源: https://stackoverflow.com/questions/7497910/simple-input-dialog-in-nsis


GITHUB: https://github.com/jash-git/Jash-good-idea-20210318-001/tree/master/nsis%20inputbox


code:

Outfile test.exe
Requestexecutionlevel user

!include nsDialogs.nsh

Page Custom mypagecreate mypageleave
Page Instfiles

Function mypagecreate
Var /Global MyTextbox
nsDialogs::Create /NOUNLOAD 1018
Pop $0
${NSD_CreateText} 10% 20u 80% 12u "Hello World"
Pop $MyTextbox
nsDialogs::Show
FunctionEnd

Function mypageleave
${NSD_GetText} $MyTextbox $0
MessageBox mb_ok $0
Abort ;Don't move to next page (If the input was invalid etc)
FunctionEnd

Section
SectionEnd


成果圖:

One thought on “NSIS 輸入對話盒 (GOOGLE: nsis inputbox)

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *