Page 1 of 1

How to show text in field over the time

Posted: Wed Mar 16, 2016 4:01 pm
by pkmittal
Hi, I want to show the pre-defined long text of the field paragraph as a story telling experience. Each character of the field should be displayed in 10 miliseconds.. so that a full paragraph can be shown in let say X seconds.

Field contain the rich formatted Text. It should look like as some one is typing the field message character by character. Can you please let me know how to do that ?

Thanks
pkm

Re: How to show text in field over the time

Posted: Wed Mar 16, 2016 4:07 pm
by dunbarx
Hi.

So much fun.

Raspberries to youse others.

Sorry pkm, inside joke.

Make a field with some text in it, make another field. Now make a button, and put this in its script:

Code: Select all

on mouseUp
   put field 1 into tText
   repeat for each char tChar in tText
      put tChar after field 2
      wait 10 milliSec
   end repeat
end mouseUp
Craig Newman

Re: How to show text in field over the time

Posted: Wed Mar 16, 2016 4:25 pm
by Simon
Wait-a-sec....
What about "type"?
See dictionary :)

Simon

Re: How to show text in field over the time

Posted: Wed Mar 16, 2016 4:28 pm
by pkmittal
Thanks. It works. However I wanted to have the same color and fonts in the destination field.. How can I change the color and font size of the destination text when I am assigning the text in the field dynamically..

Re: How to show text in field over the time

Posted: Wed Mar 16, 2016 4:33 pm
by pkmittal
Thanks Simon, Type makes it even more easier..

Re: How to show text in field over the time

Posted: Wed Mar 16, 2016 4:33 pm
by Simon
ooops.. RTF forgot about that.

Simon

Re: How to show text in field over the time

Posted: Wed Mar 16, 2016 4:51 pm
by pkmittal
But good to know Type command. But even the other code does not preserve Rich Text format

Re: How to show text in field over the time

Posted: Wed Mar 16, 2016 4:53 pm
by Simon
Use Craig's method and check out "RTFText".

Simon