EDITING NOTE FROM DON FERGUSON:
Based on later postings, what I suggested below does NOT work! The .dll apparently inserts its own vbcrlf command. However, I'm leaving the posting below to maintain the continuity of the conversational thread. If anyone discovers a workaround for this issue, please post! Thanks! Don
Hi Larry,
I think that Brianstorm is on the right track. Here's a way that you can get what you want, using the halbrain.ChooseSentenceFromFile function. Here is how it could work:
1. As you know, ChooseSentenceFromFile selects a random file entry from among all the file entries. It distinguishes the file entries from each other because each separate entry ends with a line break. The line breaks are inserted from the various AppendFile routines written in the script, using the "vbcrlf" (Visual Basic Carriage Return Line Feed) command embedded with the text of what gets saved. It's that "vbcrlf" that tells where to put the line breaks when you append to the file.
2. To create an appending file with no line breaks, write an AppendFile routine to build the file you're interested in WITHOUT any line break commands! You can experiment to see if punctuation makes any difference (I don't think that it does), or to be super-safe, end each entry with a semicolon as follows:
You have a dog; Your dog's name is Spot; You like swimming; You went on vacation to Florida recently; You prefer casual shoes;
3. Once you've created a file-building routine and a file that contains no line breaks, the ChooseSentenceFromFile function only has one option when you tell it to "randomly" choose a sentence from that file... it has to pick the one-and-only entry that it sees, and read back the whole thing!
I haven't tested this, but all logic says that it should work and give you what you want.
By the way, if you want Hal to build two files, one "WITH" and one "WITHOUT" line breaks for different purposes, you simply write one routine after the other in the script (make the two file names different of course).
Thanks for an interesting idea! Have a great day!
Don