I'm still missing the point, sorry.
Can't you call fnc_XXX_Create (that doesn't show the dialog) instead of fnc_XXX_Show and do all of your testing outside the .nsi file?
My intent is to keep NSISDialogDesigner as much "code-free" as possible, because it's not a code editor.
The code-related control properties (*CustomScript) are there to take care of very special designer related needings, not covered by the designer itself.
If I missed something, please post a very simple example, maybe with pseudo-code, to explain your needings.
NSIS Dialog Designer
156 posts
Ok
I undestand that.. thanks!
I undestand that.. thanks!
some more few little bugs
When changing the attribute readonly on number control I found these errors...
When changing the attribute readonly on number control I found these errors...
; === ins_txt_cnpj (type: Number) ===
${NSD_CreateNumber} 53.32u 158.77u 80.96u 12.92u ""
Pop $R0
SetCtlColors $R0 0x000000 0xECE9D8 TextLimit also doesn't work, nothing happens!New version 1.3.3 released
I've just released version 1.3.3 that fixes those bugs.
You can download it from here: http://coolsoft.altervista.org/nsisdialogdesigner
Thanks for reporting it.Originally Posted by shadowpoa View PostWhen changing the attribute readonly on number control I found these errors...
TextLimit also doesn't work, nothing happens!; === ins_txt_cnpj (type: Number) === ${NSD_CreateNumber} 53.32u 158.77u 80.96u 12.92u "" Pop $R0 SetCtlColors $R0 0x000000 0xECE9D8
I've just released version 1.3.3 that fixes those bugs.
You can download it from here: http://coolsoft.altervista.org/nsisdialogdesigner
Hi,
Another little problem:
When creating hline control, nsis wants you to pop his handle from stack, but edit doesn't add the code automatically, it just creates the control but doesn't pop it.
Here´s a sample.
; handle variables
Var hCtl_teste2
Another little problem:
When creating hline control, nsis wants you to pop his handle from stack, but edit doesn't add the code automatically, it just creates the control but doesn't pop it.
Here´s a sample.
; handle variables
Var hCtl_teste2
; dialog create function
Function fnc_teste2_Create
; === teste2 (type: Dialog) ===
nsDialogs::Create 1018
Pop $hCtl_teste2
${If} $hCtl_teste2 == error
Abort
${EndIf}
!insertmacro MUI_HEADER_TEXT "Dialog title..." "Dialog subtitle..."
; === HLine1 (type: HLine) ===
${NSD_CreateHLine} 42.13u 47.38u 229.06u 1.23u "HLine1"
FunctionEnd ChangeUI
can you add an option to specify other exe for ui than modern.exe?
I know I can change the rect in dialog id field, but not all options are supported..
as say the text below:
can you add an option to specify other exe for ui than modern.exe?
I know I can change the rect in dialog id field, but not all options are supported..
as say the text below:
ChangeUI
Replaces dialog (IDD_LICENSE, IDD_DIR, IDD_SELCOM, IDD_INST, IDD_INSTFILES, IDD_UNINST or IDD_VERIFY) by a dialog with the same resource ID in ui_file.exe. You can also specify 'all' as the dialog if you wish to replace all 7 of the dialogs at once from the same UI file. For some example UIs look at Contrib\UIs under your NSIS directory.
IDD_LICENSE must contain IDC_EDIT1 (RICHEDIT control).
IDD_DIR must contain IDC_DIR (edit box), IDC_BROWSE (button) and IDC_CHECK1 (checkbox).
IDD_SELCOM must contain IDC_TREE1 (SysTreeView32 control), and IDC_COMBO1 (combo box).
IDD_INST must contain IDC_BACK (button), IDC_CHILDRECT (static control the size of all other dialogs), IDC_VERSTR (static), IDOK (button), and IDCANCEL (button). If an image control (static with SS_BITMAP style) will be found in this dialog it will be used as the default for SetBrandingImage
IDD_INSTFILES must contain IDC_LIST1 (SysListView32 control), IDC_PROGRESS (msctls_progress32 control), and IDC_SHOWDETAILS (button).
IDD_UNINST must contain IDC_EDIT1 (edit box).
IDD_VERIFY must contain IDC_STR (static).
Parameters:
dialog ui_file.exe
Example:
ChangeUI all "${NSISDIR}\Contrib\UIs\sdbarker_tiny.exe" Version 1.4.0 released
Just released version 1.4.0.
Now fixed, thanks.
I added a new property DialogUI: when set to custom you're now free to set any DialogID and Size.
DialogUI default value is "modern" (corresponding to "modern.exe"), so dialogs created with previous versions are still working.
Should be great to have a list of known <DialogUIs, DialogIDs, width, height>, like:
If you could help... I'll add it to next version 😉.
Thanks for your help.
Just released version 1.4.0.
You're right, it will also cause a (small) stack leak.Originally Posted by shadowpoa View PostWhen creating hline control, nsis wants you to pop his handle from stack...
Now fixed, thanks.
can you add an option to specify other exe for ui than modern.exe?You can set custom size only if dialogID is different from 1018 and 1040, and some other UIs use these values (but with different sizes).
I know I can change the rect in dialog id field, but not all options are supported..
I added a new property DialogUI: when set to custom you're now free to set any DialogID and Size.
DialogUI default value is "modern" (corresponding to "modern.exe"), so dialogs created with previous versions are still working.
Should be great to have a list of known <DialogUIs, DialogIDs, width, height>, like:
but it's a long task and I actually don't have the time to prepare it."modern.exe", 1018, <width>, <height>
"modern.exe", 1040, <width>, <height>
"sdbarker_tiny.exe", xxx, <width>, <height>
"sdbarker_tiny.exe", yyy, <width>, <height>
...
If you could help... I'll add it to next version 😉.
Thanks for your help.
thanks!
I´ll be glad to help, what you need me to do?
Other small but annoyng thing, is it possible to make labels transparent on designer window?
Thanks for the fast response and version... 😁
I´ll be glad to help, what you need me to do?
Other small but annoyng thing, is it possible to make labels transparent on designer window?
Thanks for the fast response and version... 😁
Thanks for your offer, but this is not an easy task unless you're a C++ programmer...Originally Posted by shadowpoa View PostI´ll be glad to help, what you need me to do?
You should open each available UI exe with a resource editor (or with VisualStudio, see the attached image), then find contained dialogs (but only the ones used as "containers") and extract their dialogID, width and height. Width and Height are represented in DialogUnits, so they must also be converted to pixels...
Once I have these informations (in a .txt file) I could make DialogID property of the editor show only the dialogs belonging to the given DialogUI.
Not an easy task, I hope I'll find some more spare time to dedicate to this.
but...
Thinking of that, I just created the new dialogui with resource hacker, cant I just select the UI I have and the editor show the files instead of "custom" and adds to test script
Sure, creating new UI´s on dialog designer would be a Cool option, but this should be good enough to test out own code...
Other thing that would be cool to support is the great plugin nswindows:
Thinking of that, I just created the new dialogui with resource hacker, cant I just select the UI I have and the editor show the files instead of "custom" and adds to test script
ChangeUI all "${NSISDIR}\Contrib\UIs\sdbarker_tiny.exe" for example... and then we can test with our own UI instead of creating one?Sure, creating new UI´s on dialog designer would be a Cool option, but this should be good enough to test out own code...
Other thing that would be cool to support is the great plugin nswindows:
little bug... and suggestion.
CreateFuncionCustomScript and FooterCustomScript are inverted...
And to be more understandable fields should appear in the order that are included in the script, and not in alphabetical order.
CreateFuncionCustomScript and FooterCustomScript are inverted...
And to be more understandable fields should appear in the order that are included in the script, and not in alphabetical order.
What you mean?Originally Posted by shadowpoa View PostCreateFuncionCustomScript and FooterCustomScript are inverted...
CreateFuncionCustomScript is meant con contain custom code to be added at the end of Create function, when all controls have been created. Property description (show them by right-clicking the property grid and check "Descriptions") says "NSIS script you want to append to the *Create function of generated .nsdinc script".
FooterCustomScript is custom code added at the end of the .nsdinc file.
As for the properties ordering, that's out of my control.
PropertyGrid is a .NET Framework component and properties are self read by that component through reflection... VisualStudio has the same... issue.
my mistake!
sorry... dont have read the description "CreateFuncionCustomScript" sends me to "create a function" that is done by "FooterCustomScript
and on the suggestion of ChangeUI?
sorry... dont have read the description "CreateFuncionCustomScript" sends me to "create a function" that is done by "FooterCustomScript
PropertyGrid is a .NET Framework component and properties are self read by that component through reflection... VisualStudio has the same... issue.I understand that... but thanks for always fast reply...
and on the suggestion of ChangeUI?
New little bug:
when saving an archive with another name, titlebar doesn't update, making difficult to have sure of what archive is being written...
In print attached I "saved as" from "tela_lalala.nsdef" to "tela_uninst.nsdef", but the name have been updated only in tab...
See attachment...
Thanks!!
when saving an archive with another name, titlebar doesn't update, making difficult to have sure of what archive is being written...
In print attached I "saved as" from "tela_lalala.nsdef" to "tela_uninst.nsdef", but the name have been updated only in tab...
See attachment...
Thanks!!
Just one Label RTL
After some testing, I figured out that Ex Style for just one label RTL is ${WS_EX_LAYOUTRTL} not ${WS_EX_RTLREADING}.. please fix or add this stype, its already included on nsdialogs.nsh by default.
Here some reference... https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
for me, just add WS_EX_LAYOUTRTL did the trick... below and example.
After some testing, I figured out that Ex Style for just one label RTL is ${WS_EX_LAYOUTRTL} not ${WS_EX_RTLREADING}.. please fix or add this stype, its already included on nsdialogs.nsh by default.
Here some reference... https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
for me, just add WS_EX_LAYOUTRTL did the trick... below and example.
; === sr_lbl_prcnt (type: Label) ===
${NSD_CreateLabel} 487 263 111 23 ""
Pop $lbl_prcnt
${NSD_AddExStyle} $lbl_prcnt ${WS_EX_LAYOUTRTL} Thanks!Still working on it, but actually I'm a bit... out of spare time 😉Originally Posted by shadowpoa View Postand on the suggestion of ChangeUI?
:d
do not worry, just asked to know ...
do not worry, just asked to know ...
Hi,
I am doing some cleanup in my code, i have noticed the code below:
Using like this, a memory leak, NSIS will put on the top of stack the dialog's Handle..
Using like this the problem is not shown anymore:
Here's the doc:
Correct If I am wrong... thanks!
I am doing some cleanup in my code, i have noticed the code below:
nsDialogs::Show $hCtl_dialog What is the problem:Using like this, a memory leak, NSIS will put on the top of stack the dialog's Handle..
Using like this the problem is not shown anymore:
nsDialogs::Show Looking at NSDialogs docs, I dont see a handle passed to the show function.Here's the doc:
Correct If I am wrong... thanks!
If I use !include on HeaderCustomScript it gets ommited from generated script, but it appears on below panel...
See prints to better understand..
print1.jpg - script opened with hm nsis editor
print2.jpg - script being visualized on coolsoft editor.
Thanks!
See prints to better understand..
print1.jpg - script opened with hm nsis editor
print2.jpg - script being visualized on coolsoft editor.
Thanks!
Other little thing
for vline and hline we can have it visible true or false... but cant do it on designer...
thanks!
for vline and hline we can have it visible true or false... but cant do it on designer...
thanks!
It there anything I can do that is similar to an "OnLoad" function, unless I am just missing the fact that I can do it already...
Once the form becomes visible, I would like it to go ahead an start kicking off a particular function, not requiring user interaction. If I try to do it in the ControlCustomScript, it has to wait for that execution to finish before it loads/shows the dialog, and the function may take a few minutes to execute. Not to mention, I would like that function to be able to report status back to the dialog and it has to exist first...
Thanks...
Once the form becomes visible, I would like it to go ahead an start kicking off a particular function, not requiring user interaction. If I try to do it in the ControlCustomScript, it has to wait for that execution to finish before it loads/shows the dialog, and the function may take a few minutes to execute. Not to mention, I would like that function to be able to report status back to the dialog and it has to exist first...
Thanks...
This doesn't belong in the Dialog Designer thread. You can use a timer:
Function PageCreatorFunction
; ...
${NSD_CreateTimer} BgStuff 1
nsDialogs::Show
FunctionEnd
Function BgStuff
${NSD_KillTimer} BgStuff
; do your stuff here
FunctionEnd
Function PageCreatorFunction
; ...
${NSD_CreateTimer} BgStuff 1
nsDialogs::Show
FunctionEnd
Function BgStuff
${NSD_KillTimer} BgStuff
; do your stuff here
FunctionEnd
Version 1.4.1 released
v.1.4.1 - 2015-09-07
New version can be found here, as usual.
v.1.4.1 - 2015-09-07
- FIX: Fixed small memory leak in generated NSIS script (dialog handle left on the stack when calling nsDialogs::Show).
New version can be found here, as usual.
Can't get a "post" function to be called...
Hi,
First off, thanks for this great tool! It saved a lot of time for me.
I do have one "small" issue with it. I am trying to add a "post" function to the page that gets the values from the elements selected / entered in the function created by the designer:
Any ideas what I'm doing wrong?
Thanks!
Hi,
First off, thanks for this great tool! It saved a lot of time for me.
I do have one "small" issue with it. I am trying to add a "post" function to the page that gets the values from the elements selected / entered in the function created by the designer:
Problem is, the fnc_Remote_Installer_Leave function is never called. The dialog is displayed, the "Install" button is there but when I click it, the installation just "completes". Nothing is written with DetailPrint.Name "IDI Remote Installer"
OutFile "IDI_Remote_Installer.exe"
!include Sections.nsh
!include MUI2.nsh
!include nsDialogs.nsh
!include LogicLib.nsh
!include Remote_Installer.nsdinc
Var arg
Page custom fnc_Remote_Installer_Show fnc_Remote_Installer_Leave
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Function fnc_Remote_Installer_Leave
StrCpy $arg "/S"
${NSD_GetText} $hCtl_Remote_Installer_dbcacheValue_Txt $0
StrCpy $arg '$arg /dbcache="$0"'
DetailPrint "Argument is: $arg"
FunctionEnd
Section
SectionEnd
Any ideas what I'm doing wrong?
Thanks!
OMG, too early in the morning. I just realized I had actually put the DetailPrint in the "post" instead of in the section.
Never mind me...
Once more, really great tool! Thanks!
Never mind me...
Once more, really great tool! Thanks!
Glad you sorted it out by yourself 😉
Thanks Nicorac!. Always keep it working!.
Can I edit mui2 pages with NSI Dialog Designer?
NSIS Dialog Designer only generates new .nsi files to be included in your existing NSIS script.
It manages 2 kinds of file: .nsddef which is an XML style dialog definition (used by NSIS Dialog Designer) and a .nsdinc file which is a plain NSIS script to be included in existing scripts (output only, can only be edited with its source .nsddef).
It cannot import existing files, sorry; you have to start your dialogs from scratch.
It manages 2 kinds of file: .nsddef which is an XML style dialog definition (used by NSIS Dialog Designer) and a .nsdinc file which is a plain NSIS script to be included in existing scripts (output only, can only be edited with its source .nsddef).
It cannot import existing files, sorry; you have to start your dialogs from scratch.
Thanks for fast replay, well, i soppose i'd have to start from scratch(sorry for my bad english). Again, thanks.