I am trying to collect mouse-click responses during a certain time frame in an 
experiment. What I need is something like the WaitForAnyKeyDownWithTimeout 
function, but for a mouse click. This seems like it might be a function that 
wouldn’t be too difficult to create, but I’m very new to PEBL, so I’m not 
entirely sure how to go about that. Any advice would be much appreciated! Thank 
you in advance!

Here’s a snippet of my current code, in case it helps:

define Start(p)
{
win <- MakeWindow ()
inst <- EasyTextBox("",400,300,win,22,600,200)
inst.text <- "After hearing two (2) sounds, indicate whether the pair of sounds 
you just heard is similar (right click) or dissimilar (left click). Press any 
key to continue."
WaitForAnyKeyDown ()
RemoveObject (inst,win)

stimonset<-GetTime()
prime <- EasyTextBox("",400,300,win,22,600,200)
prime.text <- "                                       WAIT

dissimilar (left click)                        similar (right click)"
order1 <-LoadSound("EEGAudioSessionORDER1.wav")
PlayBackground(order1)
Draw()
Wait(21000)


resp <- EasyTextBox("",400,300,win,22,600,200)
resp.text <- "                                       RESPOND

dissimilar (left click)                        similar (right click)"
Draw()
response<- GetMouseState() ##Leftclick is 1, rightclick is 3.
Print(response)
}

_______________________________________________
Pebl-list mailing list
Pebl-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pebl-list

Reply via email to