Response bar updated by multiple presses

153 views
Skip to first unread message

free_operant_task

unread,
Jun 6, 2013, 12:02:08 PM6/6/13
to e-p...@googlegroups.com

Hi,

I hope someone can help and apologies in advance for my elementary coding skills.

I am trying to create a response bar (drawn by the canvas function) that is incrementally filled by each button press (each of the multiple button presses required for an individual trial). I have tried to combine the ScoreBar and MultipleResponseCollection sample scripts from the PST eprime support site. I want the number of presses required to be randomly determined by an attribute called MaxCount (which is set by RewardProb) at the beginning of each trial. Eventually, the duration of each trial will also vary depending on RewardProb (this bit works well in another script I have).

I am attaching the script that I have so far. It seems to be partially working. When the number of presses set by the attribute MaxCount is reached, the trial terminates as it should, however, there is a substantial delay before the response bar starts filling. Also, I would like the canvas to be cleared of all images after each trial (because the next thing I am going to work on is making the size of the response bar variable on each trial). But for now, I would greatly appreciate any help with getting a response bar that fills with each press on a single trial and clears after the trial is finished.

Many thanks in advance if you can help!

EffortBar_FreeOp_6.6.13.es2

Paul Groot

unread,
Jun 7, 2013, 12:41:33 PM6/7/13
to e-p...@googlegroups.com
hi,

It seems that you now have a stimulus screen (with a static contents) that stays on screen until all presses are collected. Then, when the Stimulus object finishes, you start an inline script that processes all past button presses. If you would like to update the bar immediately after each button press, you need a different construct. I think it would be very similar to the code I used in my VAS example script: http://pfcgroot.nl/e-prime/83-example-scripts/80-visual-analogue-scale-example-for-e-prime.html  (look at the DragScale function). Also note that you should set the duration of the Stimulus screen to zero, or set the prerelease to same as duration.

Best
Paul




--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+u...@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/470f1db1-0c3a-4542-9c9c-1fd114c0a0cc%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Message has been deleted

Paul Groot

unread,
Jun 8, 2013, 7:10:25 PM6/8/13
to e-p...@googlegroups.com
Packages should first be added to the default package directory (My Experiments/Packages), or put in a folder that you explicitly added to the package folder search list in EStudio. Then restart estudio and add it to your exp. However, to view the script I mentioned, you could open the package in the package editor instead. (EStudio will only show the package content only in the generated ebs-script.)

~paul


On 7 June 2013 21:27, free_operant_task <holly...@gmail.com> wrote:
Hi Paul,

Thanks for your reply and for sharing your VAS script. I seem to be having some trouble adding the VAS.epk2 package. When I go to Experiment Object Properties >> Add the package is not given as an option to be added. Do you have any suggestions? Is the package soemthing I have to purchase to activate?

Many thanks for your help.

~Holly

free_operant_task

unread,
Jun 8, 2013, 7:55:51 PM6/8/13
to e-p...@googlegroups.com
Hi Paul,

Thanks so much for all of your help. I have been playing with your script and I think it will be very useful in redesigning my task.

Thanks for sharing!

~Holly
Reply all
Reply to author
Forward
0 new messages