forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VDSFLIST and Multiple masks search solution?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Fri Jun 18, 2004 11:43 am    Post subject: VDSFLIST and Multiple masks search solution? Reply with quote

Hello,

Ive been trying to find a solution to the limitation of one file mask that VDSFLIST has. Now I want to search for multiple file types in one search.
I know in VDS in can be done with scripting, but for some reason when the filelist starts for the first time it takes long and also its not using threads.

So here is a VDSFLIST example(which comes with VDSDLL3 Very Happy ) that vtol did and I tried modifying it to support multiple file types , but does somebody has a better solution than this?

Code:
#define command,flist
  #define function,flist
  OPTION DECIMALSEP, "."
 
  external @path(%0)vdsflist.dll
   flist threads,threads

  DIALOG CREATE,flist test,-1,0,400,190
  DIALOG ADD,LIST,box1,15,11,378,115
  DIALOG ADD,BUTTON,test,148,15,43,19,Test
  DIALOG ADD,BUTTON,abort,148,75,43,19,Abort
  DIALOG ADD,BUTTON,cancel,148,340,43,19,Close
  DIALOG ADD,BUTTON,save,148,275,43,19,Save
  DIALOG ADD,STATUS,status,Ready...
  DIALOG SHOW

  gosub enablesearch

:EVLOOP
  WAIT EVENT
  GOTO @EVENT()

:enablesearch
  dialog title,flist test
  dialog enable,test
  dialog enable,cancel
  dialog enable,save
  dialog disable,abort
  dialog cursor
  wait "0.2"
  exit

:disablesearch
  dialog cursor,wait
  wait "0.2"
  dialog title,"Please wait, performing search..."
  dialog disable,test
  dialog disable,save
  dialog disable,cancel
  dialog enable,abort
  exit

:cancel-import
  dialog title,flist test
  dialog enable,test
  dialog enable,cancel
  dialog enable,save
  dialog disable,abort
  dialog cursor
  wait "0.2"
  goto evloop

:testBUTTON
  LIST clear,box1
  gosub disablesearch
  %%search_area = @DIRDLG(Choose your file list,c:\,shownewfolderbutton)
  IF @equal(%%search_area, )
    goto cancel-import
  END
  dialog set,status,Searching on drive    Please wait..
  flist flags,F
  flist list,%%search_area,*.bat,ahrs*
  %%txt = 1
  %%doc = 1
  wait "0.2"
  goto evloop

:saveBUTTON
  FLIST SAVE,c:\zztest\example.txt
  wait "1"
  info Successefully saved:@FILL(3,,L) C:\ZZTEST\Example.txt
  goto evloop

:abortBUTTON
  flist abort
  wait "0.4"
  LIST clear,box1
  goto evloop

:FLISTDONE
  list append,box1,@flist(get)
  dialog set,status,Number of files found: @count(box1)
  wait "0.2"
 #multiple masks
  if @equal(%%txt,1)
     gosub txtsearch
  end
  if @equal(%%doc,1)
     gosub docsearch
  end
 
  gosub enablesearch
  goto evloop

:txtsearch
  #info doing txt
 wait,"0.5"
  flist flags,F
  flist list,%%search_area,*.txt,ahrs*
  %%txt = 0
  exit

:docsearch
 # info doing doc
  wait,"0.5"
  flist flags,F
  flist list,%%search_area,*.doc,ahrs*
  %%doc = 0
  exit
 
:cancelBUTTON
:close
  flist abort
  exit


Thanks in advance for your ideas and suggestions...
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group