Thanks Ozkan
Even after reading the script tutorial I wouldn't have come up with that.
I couldn't get the "Message" line to work though - all that happened was that a
message box came up with the contents "&(showline)".
Never mind. I discovered how to save the randomly selected line to a text file which I
could then display by other means.
One other point.. as I find quote "gems", I add them to the quotes file. Is there
anyway to get Powerpro to calculate the number of lines in the file automatically
rather than have me manually change the script?
My thanks
Paul
--- In [EMAIL PROTECTED], Ozkan <[EMAIL PROTECTED]> wrote:
>
> Wednesday, May 12, 2004, 8:21:23 AM, you wrote:
> Can anyone advise me if Powerpro can be used to randomly select a single line from a
> text file, and then save that line to a text file. If so, could you please explain
> how.
>
> What I'm trying to do is display a random quote-of-the-day from a text file on my
> computer.
>
> ------------------------------------------------------------------------------------------------
> Try this simple script
> ----
> ;Change 30 with the munber of lines in your text file
> local qlines = random(30)
>
> ;Change below path to your text file.
> local showline = readline ("f:\Documents\quotesfile.txt",qlines)
>
> Message 10 &(showline)
> Quit
> ------------------------------------------------------------------------------------
>
> Save it with the name "quotations.powerpro" and run it as ".qotation"
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
---------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/