|
Post by student on Feb 18, 2021 10:23:06 GMT
Hello,
I am trying to save the variable ''TT'' release time. However, the results are not showing this value it is rather indicating that the Variable is undefined.
How can I do to define this variable to get the release time of the button?
Thank you in advance Hanna
|
|
|
Post by PsyToolkit on Feb 19, 2021 9:21:48 GMT
In the current version, this does not yet work, but will be implemented soon.
|
|
|
Post by student on Feb 19, 2021 9:38:34 GMT
Thank you!
Is there currently another way to measure the duration of the key press (from the moment the key goes down till it is released)?
|
|
|
Post by PsyToolkit on Feb 19, 2021 22:56:54 GMT
Why do you need it?
|
|
|
Post by student on Feb 20, 2021 10:11:35 GMT
I am intrested in measuring the duration of the movement since I am trying to create a task evaluating motor learning through a finger tapping task. I want to record many factors including the duration of the each press.
|
|
|
Post by PsyToolkit on Feb 24, 2021 20:10:54 GMT
I agree, for this it can be useful. Keep track of the Twitter news from PsyToolkit, I will try to add it in the upcoming release in the next two weeks.
|
|
|
Post by martinloeffler on Jun 3, 2022 11:58:40 GMT
Hello! I have a similar question. I have an experiment, where I want to record the number of button presses and give the subject a visual feedback of the number of presses they did in a given time window. The web-based code below illustrates in a very basic form how one run would look like. My problem is, that I want to wait until the subject releases the button before recording the next button press (Otherwise the subject can hold down the button and this will be regsitered as multiple presses). I found the function keystatus here: www.psytoolkit.org/doc2.4.0/syntax.html which, I think, would solve the problem. Unfortunately, it is not available in the web-based version. Is there any other way to solve this in the web-version? Thanks for your help! Best, Martin # Here the code that illustrates my problem: task my_task keys space set $my_trial_duration 10000 set $my_time_start time-since-start set $my_time_end expression $my_time_start + $my_trial_duration set $y 200 while $y > -200 set $my_time_inside time-since-start if $my_time_inside > $my_time_end set $y -999 fi set $time_end_key expression $my_time_end - $my_time_inside show rectangle 0 $y 75 5 255 0 0 set $y decrease 5 readkey 1 $time_end_key while-end
block test tasklist my_task 1 end
|
|