Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 11 of 11
  1. #1
    Join Date
    Jul 2004
    Posts
    313

    Table help please

    Hi all,

    I would like to have a table which lists all the .xls files in one directory but I don't know where to start.

    Can anyone help me out with a sample?

    It would be very much appreciated.

    Also does anyone know how to email an attachment from within AMS or via asp/php?

    thanks in advance.

    Ian

  2. #2
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    Very simple, you use the File.Find action which returns a table, as follows:

    myTable = File.Find( _SourceFolder, "*.xls", true, false);


    Good luck,
    Yossi

  3. #3
    Join Date
    Jul 2004
    Posts
    313
    Thanks Yossi,

    Do you know how I would get Source_Drive\Program Files\ My dir?

    Also. Is my table made from a ListBox?

    I have ListBox1 = File.Find( _SourceFolder, "*.xls", true, false);

    I am not very good at all this and I appreciate your help.

    Regards

    Ian

  4. #4
    Join Date
    Jul 2004
    Posts
    313
    I have managed to list all the files in one directory but I would like to be able to click on the given filename and open it in its default program.

    Can anyone help me achieve this?

    Thanks in advance.

    Ian

  5. #5
    Join Date
    Jul 2004
    Posts
    313
    Hi All,

    again, I have managed to display all the .xls files in a listbox object but I would like to beable to highlight the filename and click an open button to open the file.

    Can anyone please help me achieve this?

    Thanks

  6. #6
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    Hallo ianhull

    Let's assume that you have managed to load the files into a listbox object. Let's assume that the files loaded into listbox object are the paths to these files.
    This is the code you need to open these files. You can place the code at the On Dubbel-Click event of the listbox object or at the On-Click event of a button.

    result = ListBox.GetSelected("ListBox1");
    result2 = ListBox.GetItemText("ListBox1", result[1]);
    File.Open(result2, "", SW_SHOWNORMAL);

    Sside

  7. #7
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    Here you have a little example the way i understand it.

    You must double click it to open it (the excel file)
    Last edited by sside; 02-22-2007 at 04:56 PM.

  8. #8
    Join Date
    Jul 2004
    Posts
    313
    Hey thanks for the sside!!!!.

    Very much appreciated.

    One other thing though. Can you help me to set it up so that it looks in _Sourcedrive\\MyFolder?

    Thanks for your time.

    regards Ian

  9. #9
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    File.Open(_SourceDrive.."\\MyFolder\\MyText.txt", "", SW_SHOWNORMAL);
    Last edited by sside; 10-04-2004 at 06:10 PM.

  10. #10
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Here is another project. I have tried to comment the text to help in learning how to work with Tables and listbox items. There are two buttons for adding items to the listbox, one uses a static path and the other allows the user to select the folder where the files exist.

    Tigg
    Attached Files
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  11. #11
    Join Date
    Jul 2004
    Posts
    313
    Thanks TJ.

    Much appreciated.

Similar Threads

  1. CSV file content to a table into AMS5. Is it possible?
    By Martin_SBT in forum AutoPlay Media Studio 5.0
    Replies: 18
    Last Post: 11-21-2005, 12:42 AM
  2. Email Input Text ??
    By octane6228 in forum AutoPlay Media Studio 5.0
    Replies: 25
    Last Post: 02-21-2004, 03:59 PM
  3. Incrementing a table name
    By arnaud in forum AutoPlay Media Studio 5.0
    Replies: 4
    Last Post: 01-13-2004, 05:36 PM
  4. Creating a Table of Contents
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 10-03-2003, 11:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts