Simulating Keypress (beginners question)

Marc marclatz885 at googlemail.com
Wed Nov 2 10:12:46 UTC 2011


I knew that there had to be a super-easy way to do it.

Thanks a lot you two!!!

On 1 Nov., 12:48, David Vinson <d.vin... at ucl.ac.uk> wrote:
> Hi Marc,
>
> If your different stimulus types are loaded from a List, you could
> specify StimulusDuration in the list (-1 for stimulus type 1/2, or 3000
> for the "nothing" stimulus) then on the data collection object, set
> Duration to [StimulusDuration].  Unless there's some other reason you
> need to do this with E-basic.
>
> cheers,
> david
>
> On 01/11/2011 11:42, Marc wrote:
>
>
>
>
>
>
>
>
>
> > Hi Ben,
>
> > thanks for your input :)
> > The main problem is that in case that Stim 1 or 2 is presented the
> > program is supposed to wait until the user does actually react, no
> > matter how long that takes him. For the "nothing" Stims the
> > participants are told not to react on the stimulus at all, and what we
> > want to do is record whether they react anyway or not.
> > I tried setting duration to our desired presentation time for the no-
> > reaction stims, but didn't know how to tell E-Prime to ignore duration
> > time during the other stims. I read something about custom event
> > timing, but wasn't able to really figure out how that works to the
> > extent of using it...I thought it'd be something like "if stim=1 or
> > stim=2 then OnSetTime=0 and [durationVariable=infinite] else OnSetTime
> > = 0 and [durationVariable=3000]" but everything I tried with the
> > commands the E-Basic reference provides failed.
>
> > On Oct 31, 6:24 pm, ben robinson<baltimore.... at gmail.com>  wrote:
> >> if i've understood the question, this is very easy to accomplish.
> >> on whatever object is presenting your stimuli and collecting your
> >> responses (probably the same object, possibly a TextObject or
> >> SlideObject), set the InputDevice to Keyboard, Allowable responses to
> >> "12" (without the quotes, which will make both 1 and 2 allowable
> >> resposes), Duration to 3000, and EndAction to Terminate.
> >> doing this will cause your Stim object to run for 3000 ms, during
> >> which time it will accept responses of 1 or 2 only, and when one of
> >> those responses is received the Stim object will Terminate, going to
> >> the object in your procedure.  if no response is received the object
> >> will terminate after 3000 ms.  this should be covered somewhere near
> >> the very beginning of the Getting Started guide which comes with
> >> E-Prime...
>
> >> ben
>
> >> On Mon, Oct 31, 2011 at 12:46 PM, Marc<marclatz... at googlemail.com>  wrote:
> >>> hi there,
> >>> I'm just starting using E-Prime (with some VB experience, though) and
> >>> was trying to do something simple as that:
> >>> There are three stimuluses ("1","2","nothing") displayed in a
> >>> TextDisplay element which is set to react on event.
> >>> Correct responses for 1 is 1, for 2 is 2 and for nothing I'd like it
> >>> to be nothing at all.
> >>> In case the stimulus is 1 or 2 the program is supposed to wait for the
> >>> user to make his input, in the "nothing" case it's supposed to wait
> >>> for 3 or so seconds and then go to the next stimulus.
> >>> I tried to solve this via VB skills and I'm absolutely stuck here...
> >>> My code:
> >>> Dim Start as Long
> >>> Dim now as Long
> >>> Start = Clock.Read
> >>> if TextDisplay1.CRESP = "" then
> >>>         do
> >>>         DoKeys "a"
> >>>         now= Clock.Read - Start
> >>>         loop until now>2000
> >>> end if
> >>> What I'm trying to do is simulating the press of some random key (a in
> >>> this case) in order to move to the next event as soon as the 2000 ms
> >>> are over (a is also among the allowable inputs in my TextDisplay). I
> >>> tried the same with SendKeys and it won't work either, it does,
> >>> though, when I press the a key manually.
> >>> What am I doing wrong?
> >>> I'm almost certain there is an easier way to do what I want to do but
> >>> unfortunately I don't seem to be able to figure out what to google/e-
> >>> basic-/eprime search.
> >>> Some help (may it be "search for xyz in abc before asking, fool")
> >>> would be greatly appreciated!!
> >>> Marc
> >>> P.S.: In case you wonder - the programs purpose is simply getting the
> >>> loop to work and then applying it to a bitter, existing e-prime file
> >>> which we want to use as a dependent variable.
> >>> --
> >>> You received this message because you are subscribed to the Google Groups "E-Prime" group.
> >>> To post to this group, send email to e-prime at googlegroups.com.
> >>> To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
> >>> For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en.
>
> --
> David Vinson, Ph.D.
> Senior Postdoctoral Researcher
> Cognitive, Perceptual and Brain Sciences Research Department
> University College London
> 26 Bedford Way, London WC1H 0AP
> Tel +44 (0)20 7679 5311  (UCL internal ext. 25311)

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list