SNap2k
1st January 2005 11:34 UTC
locating files
hi i need the following:
on a extra page, lovate all occurences of a specific file and display a selection box where user can choose one entry...
i guess i have to use locate, but i can't figure out how.. I'm a newbie... Can someone helpme?
Afrow UK
1st January 2005 13:52 UTC
You'll need to make a custom page with InstallOptions (Contrib\InstallOptions) that has a ListBox control on it.
To find files on your hard drive, there's two functions in here:
http://nsis.sourceforge.net/archive/...instances=0,11
-Stu
SNap2k
1st January 2005 19:42 UTC
ok. now i have a custom page, but how do i manage to disable 'next' button, and start searching filesystem with a seperate custom button, and fill the listbox?
Afrow UK
1st January 2005 21:19 UTC
You can disable the Next button by using EnableWindow:
GetDlgItem $R0 $HWNDPARENT 1
EnableWindow $R0 0
To make a button call a Function, see the testnotify.nsi example script (in the InstallOptions dir).
-Stu
SNap2k
4th January 2005 14:52 UTC
and how could i manually locate a file? like with file-open dialog....?
Instructor
6th January 2005 04:02 UTC
Algorithm of this script:
1. Find files in specified directory.
2. Add founded files in List Box.
3. You must select one to enable Next button
4. If file deleted (since it found) then:
-Next button - disable
-Not existed file will deleted from List Box
Script used header
SNap2k
11th January 2005 12:21 UTC
Hi,
GREAT! Big thx! almost exactly what i needed :)
I need to search all lokal HDD so i guess GetDrives i have to use, too. But it does it only for the first Drive in my test. i put your $locate in the callback-Function of GetDrives... is that wrong?
Instructor
12th January 2005 08:40 UTC
Whereas, process of searching for occupies much time (on all HDD), I have thought better to add banner (use NSIS 2.04).
Instructor
13th January 2005 12:06 UTC
Modern UI script version:
1. Modern UI custom page
2. Start search button
3. Banner shows search in directory