Results 1 to 2 of 2

Thread: write results directly to text file rather than from variable?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091

    Question

    Hi,

    I have function named GetHTML which goes out on the web and retrieves an html file. I then write that file to a text file with the following:

    Open "c:\html.txt" As Output #1
    Print #1, GetHTML
    Close #1

    The problem is that the HTML page that I'm retriveing is extremely large. So much so that it gives me an out of memory error.

    My question is: Is there a way in which I can have VB write the results directly to the text file instead of first reading it into memory and then writing it? I figure that by doing that, it wouldn't give me a memory problem because no data would be held in memory. Hopefully that's not a dumb question..

    Any help or advice would be appreciated..

    Dan


  2. #2
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Write directly to it and stuff:
    you'd probably need something like uh:

    Winsuck1.GetData 1337htmlcode, vbstring
    Open "C:\SecretPornHiddenFromMom.html" as Append as #1
    Print #1, 1337htmlcode
    Close #1

    Best wishes to you and your loved ones!

Posting Permissions

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



Click Here to Expand Forum to Full Width