Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Posts
    4

    Reading text into table from URL

    I apologise if this has been answered before. I am an experienced programmer but new to this exciting piece of software.

    I need exactly what TextFile.ReadToTable(path) does but the text file needs to be on a web server. TextFile.ReadToTable("http://...") does not seem to work and the Web object doesn't look like doing the job, so what is the answer?

    Cheers,

    JG

  2. #2
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    Hi JG

    You can use the HTTP.Download action to download the text file to the Temp folder for example and then read it to a table.

    Code:
    HTTP.Download("http://www.yoursite.com/TextFile.txt", _TempFolder .. "\\TextFile.txt", MODE_BINARY, 60, 80, nil, nil, nil);
    Then read it into a table.

    Code:
    tbl = TextFile.ReadToTable(_TempeFolder .. "\\TextFile.txt");
    Hope that helps

    Dermot

  3. #3
    Join Date
    Feb 2005
    Posts
    4
    Thanks a lot for your help . Might be a good idea for the crew here to include the option to stipulate a URL as parameter to TextFile.ReadToTable() in a future version . This kind of transparency should really be standard.

    Cheers,

    JG

  4. #4
    Join Date
    Aug 2003
    Posts
    2,427
    HTTP.Download couldn't IMO be any more 'transparent'. Does what it says on the packet doesn't it?

    Thank goodness that you don't have to be a programmer to use AMS - I'd be out in the cold for sure

  5. #5
    Join Date
    Feb 2004
    Location
    Las Vegas
    Posts
    24
    I have a couple questions related to this.. I was looking for a solution to this very problem and stumbled upon the 'download' method myself, which works great. However, what I'm attempting to do is sort through all the data in the HTML that I download in order to find certain results. The HTML file is quite large due to the data being from an online database; it's about 1 MB in size. Generating that table takes quite a long time. I realize there are many other ways to go about this without using AMS, but I'm a non programmer using it to develop tools for our studio, and it works wonders so our paid programmers don't have to spend time on trivial tools.

    My question is two-fold.. is there another method within the confines of AMS to speed this process and will it be possible in the future for AMS to support searching through the file directly to find results rather than reading it to a table first?

Similar Threads

  1. Example: Loading Paragraph Text Using a Timer
    By Jonas DK in forum AutoPlay Media Studio 5.0 Examples
    Replies: 7
    Last Post: 11-25-2004, 05:10 PM
  2. Reading large text files
    By jwarrent in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 02-15-2004, 05:58 PM
  3. Replies: 4
    Last Post: 12-06-2003, 01:17 PM
  4. Reading Specific Lines from a Text File
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 10:38 AM
  5. HOWTO: Display Conditional Text Based Upon a List Box Selection
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-15-2002, 10:54 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