| Chaitanyansis |
8th September 2016 10:27 |
NSIS dialog designer
I am generating the design using NSIS dialog designer this is how the script was generated
PHP Code:
; =========================================================
; This file was generated by NSISDialogDesigner 1.4.2.0
; http://coolsoft.altervista.org/nsisdialogdesigner
;
; Do not edit it manually, use NSISDialogDesigner instead!
; =========================================================
; handle variables
Var hCtl_test
Var hCtl_test_Button1
Var hCtl_test_TextBox1
Var hCtl_test_Label2
Var hCtl_test_FileRequest1_Txt
Var hCtl_test_FileRequest1_Btn
Var hCtl_test_Label1
; dialog create function
Function fnc_test_Create
; === test (type: Dialog) ===
nsDialogs::Create 1018
Pop $hCtl_test
${If} $hCtl_test == error
Abort
${EndIf}
!insertmacro MUI_HEADER_TEXT "Dialog title..." "Dialog subtitle..."
; === Button1 (type: Button) ===
${NSD_CreateButton} 94.78u 70.77u 49.37u 14.15u "Submit"
Pop $hCtl_test_Button1
; === TextBox1 (type: Text) ===
${NSD_CreateText} 78.99u 38.77u 131.65u 12.31u ""
Pop $hCtl_test_TextBox1
; === Label2 (type: Label) ===
${NSD_CreateLabel} 17.11u 40.62u 65.82u 14.15u "Enter name"
Pop $hCtl_test_Label2
; === FileRequest1_Txt (type: Text) ===
${NSD_CreateText} 78.99u 17.23u 110.58u 12.31u ""
Pop $hCtl_test_FileRequest1_Txt
; === FileRequest1_Btn (type: Button) ===
${NSD_CreateButton} 190.89u 17.23u 19.75u 12.31u "..."
Pop $hCtl_test_FileRequest1_Btn
${NSD_OnClick} $hCtl_test_FileRequest1_Btn fnc_hCtl_test_FileRequest1_Click
; === Label1 (type: Label) ===
${NSD_CreateLabel} 17.11u 17.23u 65.82u 14.15u "Choose a file"
Pop $hCtl_test_Label1
FunctionEnd
; dialog show function
Function fnc_test_Show
Call fnc_test_Create
nsDialogs::Show
FunctionEnd
; onClick handler for FileRequest Button $hCtl_test_FileRequest1_Btn
Function fnc_hCtl_test_FileRequest1_Click
Pop $R0
${If} $R0 == $hCtl_test_FileRequest1_Btn
${NSD_GetText} $hCtl_test_FileRequest1_Txt $R0
nsDialogs::SelectFileDialog open "$R0" ""
Pop $R0
${If} "$R0" != ""
${NSD_SetText} $hCtl_test_FileRequest1_Txt "$R0"
${EndIf}
${EndIf}
FunctionEnd
I have included the following on the top
PHP Code:
!include nsDialogs.nsh
!include LogicLib.nsh
Name nsDialogs
OutFile nsExecuteXmla.exe
But when I am compiling with NSIS i am getting an error as follows
Processed 1 file, writing output (x86-ansi):
Error: invalid script: no sections specified
Error - aborting creation process
Can some one help me, also how can I handle the submit button I would like to allow user to select only text files in the upload controller
|