Old 1st January 2005, 10:34   #1
SNap2k
Junior Member
 
Join Date: Dec 2004
Location: germany
Posts: 7
Send a message via ICQ to SNap2k
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?
SNap2k is offline   Reply With Quote
Old 1st January 2005, 12:52   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 1st January 2005, 18:42   #3
SNap2k
Junior Member
 
Join Date: Dec 2004
Location: germany
Posts: 7
Send a message via ICQ to SNap2k
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?
SNap2k is offline   Reply With Quote
Old 1st January 2005, 20:19   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 4th January 2005, 13:52   #5
SNap2k
Junior Member
 
Join Date: Dec 2004
Location: germany
Posts: 7
Send a message via ICQ to SNap2k
and how could i manually locate a file? like with file-open dialog....?
SNap2k is offline   Reply With Quote
Old 6th January 2005, 03:02   #6
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
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
Attached Files
File Type: zip locatetest.zip (1.1 KB, 208 views)
Instructor is offline   Reply With Quote
Old 11th January 2005, 11:21   #7
SNap2k
Junior Member
 
Join Date: Dec 2004
Location: germany
Posts: 7
Send a message via ICQ to SNap2k
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?
SNap2k is offline   Reply With Quote
Old 12th January 2005, 07:40   #8
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Whereas, process of searching for occupies much time (on all HDD), I have thought better to add banner (use NSIS 2.04).
Attached Files
File Type: zip locatetest.zip (1.2 KB, 203 views)
Instructor is offline   Reply With Quote
Old 13th January 2005, 11:06   #9
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Modern UI script version:

1. Modern UI custom page
2. Start search button
3. Banner shows search in directory
Attached Files
File Type: zip locatetest.zip (1.4 KB, 212 views)
Instructor 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