|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 1/11/2008 4:08:57 AM
Posts: 4,
Visits: 11
|
|
Hi,
I'd like to get keyboard responses while running an animation loop. The loop was part of a function written in the User tab. What I tried to do was create a TextDisplay in Unreferenced E-Objects called respCollector, set its Duration so that it fitted just within the loop, and run it. Then I used respCollector.RESP to see what key was pressed. But although the TextDisplay was displayed, it wouldn't detect responses (if I set the duration to infinite I couldn't terminate the display via keypress either).
So I have two somewhat related questions:
1) How could I best gather responses in inline code? I realize I could fit everything around a list but I'd like to know how to do it from inline code if possible.
2) How can I run objects like a TextDisplay from code and be able to access responses? I can do that when they're part of a procedure and the inline code is placed after the display, but how can I call them from code "at will"?
Thanks in advance!
Thomas
|
|
|
|
|
Forum Guru
      
Group: Moderators
Last Login: 10/30/2008 3:23:17 PM
Posts: 127,
Visits: 924
|
|
Hi Thomas,
I would recommend looking at the attached sample, which demonstrates how to run InLine script while a response object is on screen. E-Prime will continue to collect responses while the InLine script is running.
For more information on how the sample works, double-click the Experiment object at the top of the Structure window and take a look at the abstract.
- Matt
PST Technical Consultant
http://pstnet.com
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 1/11/2008 4:08:57 AM
Posts: 4,
Visits: 11
|
|
| Thanks very much Matt, it's working fine now! Regards, Thomas
|
|
|
|