tjframe at gmail.com
Sat Oct 1 07:37:06 EDT 2005
If I understand your question correctly, I think one way to do what you want
put item ( random(the number of items of fld "ranName")) of fld "ranname"
into field "Question"
as for using items - by default Rev uses commas as item delimiters, but you
can set tah to anything you want.
for example :
put the itemdel into oldDelim -- stores old delimiter
set the itemdel to "^"
-- do stufff
set the itemdel to oldDelim --- reverts to old delimiter
thus you can seperate your blocks of text with some strange character and
use that as the itemdelimiter and you should be good to go.
On 10/1/05, SupermanSlyr at aol.com <SupermanSlyr at aol.com> wrote:
> I'm trying to make a testing program that inserts random questions into a
> field when the card is open. I was not sure exactly how to go about doing
> This is what I tried to do. I put a field on each card with a few names on
> it, just to see if I had the random thing down. The I made the field
> I tried to scripted the card to:
> On opencard
> get random(item 1 of field "ranName")
> put it into field "Question"
> end opencard
> (I know I said the field has names in it. I just wanted to see if I could
> get random text this way before I went nuts adding long questions.)
> Also I'm still not 100% sure how (even if the above did work) to make the
> question occupy more than just one line of text. I assume I'd have to use
> "item" and maybe a chunk operation? Because I wasn't sure how Revolution
> when an item begins, and when it ends. I just want to make a simple
> program that doesn't always give the same questions. I know the answer is
> probably very simple, and right under my nose again.
> Thank all of you very, very much!
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode