Running and getting responses during a loop / from a TextDisplay run from code
 
 
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Running and getting responses during a loop /... Expand / Collapse
Author
Message
Posted 10/29/2007 3:34:08 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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
Post #780
Posted 10/29/2007 4:01:17 PM


Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum 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


  Post Attachments 
ProcessResponsesTemplate.es (19 views, 21.12 KB)
Post #781
Posted 10/30/2007 6:17:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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

Post #784
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 5:11am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 11 queries. Compression Disabled.