Input object property
David McFarlane
mcfarla9 at msu.edu
Mon Jun 27 18:57:59 UTC 2011
Evelina,
Stock reminder: 1) I do not work for PST. 2) PST's trained staff
takes any and all questions at
http://support.pstnet.com/e%2Dprime/support/login.asp , and they
strive to respond to all requests in 24-48 hours -- this is pretty
much their substitute for proper documentation, so make full use of
it. 3) If you do get an answer from PST Web Support, please extend
the courtesy of posting their reply back here for the sake of others.
That said, here is my take...
As I understand it, you want to enter a color as text or numbers
during runtime, and then use that color for some text on a
Slide. Not sure why you want to do this (there is probably an better
way to achieve your ultimate end), but here are my thoughts.
First, the MsgBox() function does not work for inputting text, it
takes only button responses. For text input you will need to use
either InputBox$() or AskBox$() -- see those topics in the E-Basic
Help facility. You may then use the input text to set a color. You
may use some well-known color names, or RGB values -- I don't know
where this is documented, I had to use Find in the E-Basic Help with
"color" or "rgb" to find some glancing documentation in topics such
as StimDisplay.ForeColor. Anyway, it looks like you may indeed use
strings such as "255,255,255" for RGB values.
I would pass on the value through an attribute reference. So,
sometime before my Slide, I would have inline code such as
c.SetAttrib "ForeColor", InputBox$("Enter color:")
Then, for the text sub-object on my Slide, I would set its ForeColor
property to "[ForeColor]". That would do it (I know, because I just
tried this out and it worked). Of course, make sure to set the color
attribute at a high enough Context level -- for more on this see
Chapter 4 of the User's Guide that came with E-Prime.
Finally are a few general suggestions about using InLines:
(1) Work through Chapter 4 of the User's Guide that came with E-Prime.
(2) If you don't already have some computer programming experience,
then take a course on Introduction to Computer Programming.
(3) Work through the book "VBA for Dummies".
-- David McFarlane, Professional Faultfinder
"For a successful technology, reality must take precedence over
public relations, for nature cannot be fooled." (Richard Feynman,
Nobel prize-winning physicist)
At 6/26/2011 10:43 PM Sunday, you wrote:
>Hello,
>
>I want to be able to input a color in which words on slides are
>displayed at the beginning (or middle) of an experiment. I thought of
>using the message box but I am not sure how to pass on the input from
>the message box to the appropriate level at which the object in
>question is stored.
>
>Also, is it even possible to successfully input and use colors as RGB
>values (e.g. 133,123,142)? If not, what would be the best way to be
>able to have the flexibility to input desirable RGB values?
>
>I have limited experience with InLines so I'll be grateful for any
>suggestions :)
>
>Evelina
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
More information about the Eprime
mailing list