Displaying a countdown timer for participants
Cognitology
mspape at cognitology.eu
Fri Aug 29 11:54:19 UTC 2014
Hi,
Oops, correction:
1. Have a textDisplay, we call it PreText, duration 1, timelimit 10000 (or end of procedure, that also works). Add keyboard.
2. Add inline after this PreText:
'---------
Dim cnvs As canvas
Dim percdone As Integer
Set cnvs = Display.Canvas
cnvs.PenColor = CColor("black")
cnvs.FillColor = CColor("white")
cnvs.Rectangle Display.Xres / 2-100,Display.Yres / 2-10, 200, 20 'draw bar cnvs.FillColor = CColor("red") Do 'specially for David McFarlane, I'd use WHILE sneakily
percdone = (clock.read - PreText.OnsetTime) / 100
cnvs.Rectangle Display.Xres / 2-100,Display.Yres / 2-10, 2*percdone, 20 'draw filler
sleep 10
Loop Until ((clock.read - PreText.OnsetTime) > 10000) Or PreText.RESP <> "" 'because loop until sounds silly.
'----------
It works in EP2, probably in 1 as well. It shows a bar for 10 s, overlaying with whatever is on the screen (make PreText transparent for more options), and shows until end of response or end of 10s.
-----Original Message-----
From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Cognitology
Sent: 27. August 2014 18:57
To: e-prime at googlegroups.com
Subject: RE: Displaying a countdown timer for participants
Hi,
I'm not sure whether this would serve as a countdowntimer in the absence of the Real Deal, but here's a quick and dirty way of drawing a progressbar (the reverse of a countdown, easily fixed).
1. Have a textDisplay, we call it TextDisplay1, duration 1, timelimit 10000 (or end of procedure, that also works). Add keyboard.
2. Add inline after this textDisplay:
'---------
Dim cnvs As canvas
Dim percdone As Integer
Set cnvs = Display.Canvas
cnvs.PenColor = CColor("black")
cnvs.FillColor = CColor("white")
cnvs.Rectangle Display.Xres / 2-100,Display.Yres / 2-10, 200, 20 'draw bar cnvs.FillColor = CColor("red") Do 'specially for David McFarlane, I'd use WHILE sneakily
percdone = (clock.read - textdisplay2.OnsetTime) / 100
cnvs.Rectangle Display.Xres / 2-100,Display.Yres / 2-10, 2*percdone, 20 'draw filler
sleep 10
Loop Until ((clock.read - textdisplay1.OnsetTime) > 10000) Or TextDisplay2.RESP <> "" 'because loop until sounds silly.
'----------
It works in EP2, probably in 1 as well. It shows a bar for 10 s, overlaying with whatever is on the screen (make textdisplay1 transparent for more options), and shows until end of response or end of 10s.
It's not fantastic, I just wrote this in a few minutes. I'm not sure, for instance, if sleep 10 is necessary, for instance - if memory serves, EP2 always adds a display.waitforverticleblank after canvas operations.
Best,
Michiel
Michiel Sovijärvi-Spapé
Helsinki Institute for Information Technology HIIT Aalto & Helsinki University Finland
-----Original Message-----
From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of David McFarlane
Sent: 21. August 2014 23:06
To: e-prime at googlegroups.com
Subject: Re: Displaying a countdown timer for participants
Natalia,
Indeed, Matt Lenhart from PST posted that file to the Group over 6 years ago, back when Google Groups included a files section. Google Groups has since discontinued that feature. But you may still download that example directly from the PST website. You will need to register and login there first in order to get to the Sample Programs area.
-----
David McFarlane
E-Prime training
online: http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (https://twitter.com/EPrimeMaster)
/----
Stock reminder: 1) I do not work for PST. 2)
You may reach PST's trained staff (and other
support facilities) at https://support.pstnet.com
. 3) If you do get an answer from PST staff,
please extend the courtesy of posting their reply
back here for the sake of others.
\----
At 8/19/2014 09:22 PM Tuesday, sunnygu wrote:
>Dear Natalia,
>As far as I know, I think there is no file
>download section and you can try in PST
>community since this is a discussion forum. And
>I may suppose you can try gettimer function in
>eprime or search timer in help for ebasic to see
>if there is any function you can use.
>My best,
>
>Sally
>
>å ‘è‡ªæˆ‘çš„ iPhone
>
>在
>2014å¹´8月20æ—¥ï¼Œä¸Šå ˆ8:26,<mailto:yakunina at gmail.com>yakunina at gmail.com
>å†™é “ï¼š
>
>>Hello Matt,
>>
>>I'm sorry if it's a dumb question, but where
>>can I download the sample <http://CountDownClock.es>CountDownClock.es?
>>I'm new to this group and I couldn't find files
>>section. And I'm in desperate need of the countdown timer :)
>>
>>Thank you!
>>Natalia
>>
>>On Thursday, April 17, 2008 2:37:44 AM UTC+9, Matt wrote:
>>Hello,
>>
>>Ben's advice is very good and is the method we would recommend. I have
>>added our formal sample
>>(<http://CountDownClock.es>CountDownClock.es) to the Files section of
>>this group for reference. If you have any questions, please let me
>>know.
>>
>>Sincerely,
>>Matt Lenhart
>>PST Technical Consultant
>><http://pstnet.com>http://pstnet.com
--
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+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/53f65118.61e1320a.6681.24f8SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/03f101cfc20f%247fdaafd0%247f900f70%24%40eu.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/008001cfc37f%24f79edc00%24e6dc9400%24%40eu.
For more options, visit https://groups.google.com/d/optout.
More information about the Eprime
mailing list