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 


Filelist in tables

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Quatre87
Valued Newbie


Joined: 07 Jan 2004
Posts: 25

PostPosted: Fri Mar 05, 2004 11:08 pm    Post subject: Filelist in tables Reply with quote

I want to add files from a folder on a table, but in two columns and the filelist only can do it in one. What can i do it?
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Mar 05, 2004 11:29 pm    Post subject: Reply with quote

I'm not sure if this is what you are looking for, but you might like to look
at the FILELIST element of the VDSOBJ extension. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sat Mar 06, 2004 12:16 am    Post subject: Reply with quote

Create a string list and have the string list take in the filelist. Then
you can go line for line taking the files in the list and doing what you
want with them first before adding them to the table element.

There's a file search example floating around the main vdsworld site
that I made that might give you some ideas of what and how to do
this.

You see, if dump the filelist in a string list first, then you can process the
files to get all the information about them first before displaying them in
the table element, such as file size, attributes and so on.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
Quatre87
Valued Newbie


Joined: 07 Jan 2004
Posts: 25

PostPosted: Sat Mar 06, 2004 1:01 am    Post subject: Reply with quote

I did it too, and yes, copy the files in the other column, but copy all in ONE line, and in the end of the file appear a character like ""
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Mar 06, 2004 11:14 am    Post subject: Reply with quote

Here is a basic example of how to add files from a list into a table element... Smile

Code:
  DIALOG CREATE,Filelist dialog,-1,0,448,308
  DIALOG ADD,TABLE,FILELIST,10,5,440,290,Filename[250]|Size[170]
  DIALOG SHOW

# Create a list
list create,1
# Load the files from a directory in the list
list filelist,1,@windir()
# Begin with the first item
%z = 0
# Repeat this until "%z" is equal to the number of items
repeat
  # Add some stuff to the list. @item(1,%z) holds the current name of the file. You
  # can use @file() to get other things, like the size of the file. Use @tab() to
  # add text to the next column.
  list add,FILELIST,@item(1,%z)@tab()@file(@item(1,%z),z) bytes
  # Next item
  %z = @succ(%z)
until @equal(%z,@count(1))
# Close the list
list close,1

:Evloop
wait event
goto @event()

:Close
exit

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
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