--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
dim inputstring as string
dim outputstring as string
dim previousnum as integer
dim i as integer
inputstring = "This is an example string"
previousnum = 1
for i = 6 to len(inputstring) step 5
outputstring = outputstring & mid(inputstring, previousnum, 5) & "\n"
previousnum = i
next i
debug.print outputstring
------------
Output:
This
is an
exam
ple s
----------
How's that? This piece of code converts the inputstring to a rather crudely cut outputstring, by adding new lines after every 5th letter. Of course, you'd need to find out how many letters fit on the screen, then adjusting 'step 5' to 'step howmanyletters' and 'for i = 6' to 'for I = howmanyletters + 1'
Best,
Mich
Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
dim inputstring as string
dim outputstring as string
dim previousnum as integer
dim i as integer
inputstring = "This is an example string"
previousnum = 1
for i = 6 to len(inputstring) step 5
outputstring = outputstring & mid(inputstring, previousnum, 5) & "\n"
previousnum = i
next i
outputstring = outputstring & mid(inputstring, previousnum, 1+len(inputstring)-previousnum)
debug.print outputstring
------------
Output:
This
is an
exam
ple s
tring
------------
If you like, you could also run a text-display in a little loop to do exactly the same as the echo function; i.e., just enter a Label (let's say, Label1) just before the text display, set the text display's max count to 1 again, duration to 10 ms (or something) and check the response. Say, the textdisplay is called TextDisplay1, then use something like:
If TextDisplay1.RESP <> {ENTER} then
TextDisplay1.TEXT = TextDisplay1.TEXT & TextDisplay1.RESP
Goto Label1
End if
If word-wrap works for a normal textdisplay, then it ought to work for this as well. If it doesn't... perhaps a bug in your version of e-prime?
Sorry if I can't be of much more help - lacking E-Prime2, I expect somebody else might be of more use.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.