Random & Files

Results 1 to 3 of 3

Thread: Random & Files

  1. #1
    Join Date
    Dec 1969

    Default Random & Files

    I am wanting to write some ASP code that will randomly pick a quote from a list(a seperate file).<BR><BR>I have looked for something similar to this on ASP FAQs but all I could find was how to pick a random file or how to shuffle a deck of cards.<BR><BR>Could anyone point me in the right direction on how to do this, keeping in mind that a quote may take up more than 1 line, so I couldn&#039;t simply read one random line from a text file... there would have to be some sort of a system for reading a quote from start to finish....<BR><BR>Thanks!<BR><BR>David

  2. #2
    Join Date
    Dec 1969

    Default RE: waiting for response....

    I have a similar question. So I am waiting too.

  3. #3
    Join Date
    Dec 1969

    Default RE: Random & Files

    I&#039;ll just point you in the direction I would go.<BR>On the "Separate File" that has these quotes<BR>put them into an array<BR>from there you can get a random quote from the array.<BR>Under arrays in the Faq&#039;s section you will find lots of help there.<BR><BR><BR>But if i were you, I would build the array as dates<BR>and just show the "Quote of the Day"<BR>That way your daily viewers can see all your quotes without seeing a repeated one down the line.<BR><BR>Your call, you know what you need out of this.<BR><BR>Hope this helps some.<BR><BR>

Posting Permissions

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