BBC BASIC for Windows
« FILESEARCH »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:15pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: FILESEARCH  (Read 931 times)
Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx FILESEARCH
« Thread started on: May 24th, 2009, 04:30am »

While pondering on PROFILER.... I have written a library which will open a dialogue box and perform a recursive file search for you. (The original FNfsearch() routine by RTR). When a specific file is found the WIN32_FIND_DATA structure for that file is sent to a PROC that the user has specified (see PROC_FileSearch(PROC_FileFound()) and PROC_FileFound() in FILESEARCH DEMO). This removes the neccesity of customising the FN_fsearch routine every time you need to do a file search. You only need to update the PROC_FileFound() procedure.

Try out the demo at:

http://tech.groups.yahoo.com/group/bb4w/files/%22Temp%20Folder%22/MDCH/FILESEARCH/FILESEARCH%20DEMO.bbc

making sure you have FILESEARCH in your @lib$ folder.

http://tech.groups.yahoo.com/group/bb4w/files/%22Temp%20Folder%22/MDCH/FILESEARCH/FILESEARCH.bbc

When using it remember the procedure you name when calling PROC_FileSearch must have a pair of parenthesis so:

PROC_FileSearch(PROC_FileFound()) is correct

whereas:

PROC_FileSearch(PROC_FileFound)

will cause an error.

The parameters passed are (index%, WIN32_FIND_DATA{}) so make sure your procedure (PROC_FileFound() in this case) receives two parameters.....

Michael
User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: FILESEARCH
« Reply #1 on: May 26th, 2009, 05:24am »

I've added to FILESEARCH
:

1. You can fill a FILESEARCH_OPTIONS{} which will allow the programmer to do a user initiated file search (ie opens a dialog box) or a programmer initiate file search.

2. The WIN32_FIND_DATA{} is now converted to a BBCBASIC_FILE_DATA{} of my own design which makes it easier to extract the information you want. See the FILESEARCH DEMO (now a standalone version which should run straight from the website).

The advantage of using this library is that you can customise your search from within the PROC you name.

Michael

User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls