Skip to content
⌘ NSIS Forum Archive

Dialogs.dll: My new plugin.

62 posts

Joel#

Dialogs.dll: My new plugin.

Hello dudes!

I just create Dialogs.dll. A plugin for call the Open and Folder browse dialogs.

Test it. Please post your opinions.
Thanks 😉

PS: See the readme file for details!
deguix#
Yeah, basically it works, but how about adding more options, like to add support to appear the "Save File" dialog for example...

But I'll continue to try the System way, I'm planning to make a new header file using all the codes with System plugin... Now, about the Open dialog for my program, I'll use your plugin. Thanks.

Your DLL size is too small I think you just used 2 API for dialogs, am I right?
Joel#
I use like 10 APIs, but mostly...yeah... for those two.
I could add the "Save" dialog.... 😉 is not hard...

*Add it in the TODO list.

Thanks
Joel#
Updated to versions 1.1:
Add it the "Save" dialog.
Joel#
Lobo Lunar is in "da house"

Done it!
Now you can add you custom filter as many you want. 😁
Updated to version 1.2:
  • Change syntax.
  • Added the custom Index filter.
  • Added the multiple filter for both Open and Save Dialogs.
  • Added "Create Folfer" button on Folder Dialog.
  • Remove the current selection folder label in Folder Browse (maybe I'll put it back).

Please see the readme file for the updated syntax.
Comments, please!!! Specially from users with Win95/Win98/NT

@KirillKr: No. This is my personal work. If the dev's want it, sure.... why not 🙂
KirillKr#
>> No. This is my personal work. If the dev's want it, sure.... why not
Yes. I meant this too.
Brummelchen#
>> So... no comments?

Sorry, no app for that moment now...
Maybe in my experimental when i finished current update..
benchetrit#
A comment :
I have used your dll for folder with success. It help me to remove the Page Directory that can not be executed inside the sections. Now my installation is more user friendly.

A feature request :
Could you had the possibility to select a disk only after selection of a file or a folder.
Joel#
And know...
You can get it from the Web Archive. 😎
Thanks to all the members that test the plugin. Thanks 🙂

@benchetrit: I didn't quite understand. Do you want to select a Drive unit?
benchetrit#
Exactly, I want the user will be able to select a drive unit only. Moreover, if you could had some filters or exclusion list, it will be great. For instance, exclude a list like "C,D". Filters to exclude or include like : exclude "cdrom,networkdrive" or include "localdisk,removabledisk,floppy".
Joel#
Ok, now I understand... However I think that will be adding another dialog, I have in mind "Drive Dialog".
And yeah, maybe some filters too, although I don't know how do that, yet 🧟.

I'll work in that tonight 🙂
benchetrit#
@lobo lunar

If you continue in that direction, I will appreciate to have a string dialog for asking the user for a string, and a selection list for asking a user to select a (and why not multiple) value.
Joel#
Hi benchetrit!

I try the Drive list, and there's isn't like a special dialog for units. There's an API for detect the phisical installed drives, but It can be done using system plugin. The code for this is simple, or I can point you in the right direction (and API).

Now, I can make the "asking" string dialog but, whay kind of values the users will select? Maybe some example of it will be handy...

TODO:
I will make a dialog-style like those InputBoxes that come with Visual Basic. This will be handy if you'd like to password protect your installer without the INI thing. 🙂

Good luck to me! 😁
benchetrit#
When I tell string dialog I mean input text.

I have a question concerning Open. Is it possible to select the list of the files to display in the file selector. For instance, if I put *.txt, *.txt will be in the file name input, and only *.txt file and obviously folders of the initial folder wil be displayed for selection.
Joel#edited
oh, do you mean multiple selection files?
Is possible! 🙂

[edit]
I try a simple code snipet and NSIS doesn't give more features in looping and string manipulation. I should try another way to make NSIS outputing the multiple selection.
[/edit]
deguix#
There is a little thing called "Callback Function", it loops everytime when a result is returned, but to return to the original function, you have to end pushing something to stack to the original function know you want to continue...

Have some examples like "Detect Drives" Archive page (see my signature) of that.
Joel#
Well...that little thing is the easy part, dude 😉
The plugin have the callback function for the user selected outputvar.
That's not important, the important is get out the files since all are store in one var. Is not the "loop", is the handle for each file. I need separator, is not a typical "String function" or "Callback function", a separator to get path of the file in some place.
Nsis, as my begin question here is very limited. 🙁
Yes, there some ways to get that! I just need time. 🙄
deguix#
If I understood right:

the important is get out the files since all are store in one var.
Has a function called "StrTok" inside "StrFunc.nsh" in the include directory, it returns the string you want to be returned from a complex string. Like "Text" from string "Number|Variable|Text|GUID". It is not included on Archive (that is my AdvStrTok).
benchetrit#
Hi Lobo Lunar

I do not want multiple selection for files, I just wants that the dialog Open only displays the files that respect a string for instance *.nsi, like the standard Open File dialog do.
Joel#
lol 😁
Yeah! Filtering....

Dialogs::Open $HWNDPARENT "Nsis Files (*.nsi)|*.nsi|" "1" "Choose a file from the list" "$EXEDIR" .r0
Like this?
benchetrit#
Yes like this.

If fact I am sorry I have made a mistake, I did not understood your examples. Now it works.

Bad code :
Dialogs::Open $HWNDPARENT "SYD Licence (*.syd)|" "1" "Select Licence File" "t:\" .r0

Right code :
Dialogs::Open $HWNDPARENT "SYD Licence (*.syd)|*.syd|" "1" "Select Licence File" "t:\" .r0

Thank you. And tell me when I could have a dialog for asking a string to the user.
Joel#
Updated to version 1.3 😎

what's new:
Added the InputBox with password support. Great to password-protect your installer.

Web Archive

Comments, please! 🙂
Joel#
Updated to version 2.0.

What's new?
1. New CHM help file.
2. New output syntax style (see examples)
3. Some minor bugs.

The Web Archive.
celli#
Lobo Lunar,
I like what you did -
But when I drag the .nsi file into the compiler of the NSIS Application -
I keep getting a compile error. Am I doing something wrong ?
This is my first time using the NSIS Application.
-
Thanks.
celli#
Lobo.
Got it to work.
-
How can I specify a specific file that
I want users to save ?
-
This setUp will launch from another .EXE living on a CD-Rom
and the file that I will want to save lives on the CD-Rom as well. Can I use this to perform this task ?
-
I feel like I'm close.
-
Thanks
Joel#
How can I specify a specific file that
I want users to save ?
I have to change the source code, or you can use the filter telling the user wich one he/she have to use (see Save parameters).
This setUp will launch from another .EXE living on a CD-Rom
and the file that I will want to save lives on the CD-Rom as well. Can I use this to perform this task ?
Since the Installer (EXE) and file (to run) is in the same folder, you can use $EXEDIR with Exec functions from NSIS to execute the file.