Old 8th September 2016, 10:27   #1
Chaitanyansis
Junior Member
 
Join Date: Aug 2016
Posts: 14
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 (typeDialog) ===
  
nsDialogs::Create 1018
  Pop $hCtl_test
  
${If} $hCtl_test == error
    Abort
  
${EndIf}
  !
insertmacro MUI_HEADER_TEXT "Dialog title..." "Dialog subtitle..."
  
  
; === Button1 (typeButton) ===
  ${
NSD_CreateButton94.78u 70.77u 49.37u 14.15u "Submit"
  
Pop $hCtl_test_Button1
  
  
; === TextBox1 (typeText) ===
  ${
NSD_CreateText78.99u 38.77u 131.65u 12.31u ""
  
Pop $hCtl_test_TextBox1
  
  
; === Label2 (typeLabel) ===
  ${
NSD_CreateLabel17.11u 40.62u 65.82u 14.15u "Enter name"
  
Pop $hCtl_test_Label2
  
  
; === FileRequest1_Txt (typeText) ===
  ${
NSD_CreateText78.99u 17.23u 110.58u 12.31u ""
  
Pop $hCtl_test_FileRequest1_Txt
  
  
; === FileRequest1_Btn (typeButton) ===
  ${
NSD_CreateButton190.89u 17.23u 19.75u 12.31u "..."
  
Pop $hCtl_test_FileRequest1_Btn
  
${NSD_OnClick$hCtl_test_FileRequest1_Btn fnc_hCtl_test_FileRequest1_Click
  
  
; === Label1 (typeLabel) ===
  ${
NSD_CreateLabel17.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
Chaitanyansis is offline   Reply With Quote
Old 8th September 2016, 10:39   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
The compiler is telling you what the problem is. If you cannot read you might want to try a different setup creator suite...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 8th September 2016, 11:59   #3
Chaitanyansis
Junior Member
 
Join Date: Aug 2016
Posts: 14
Quote:
Originally Posted by Anders View Post
The compiler is telling you what the problem is. If you cannot read you might want to try a different setup creator suite...
Didn't get you any other suite available to design the UI?
Chaitanyansis is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump