# Trigger a stimulus with the mouse

**URL:** <https://discourse.psychopy.org/t/trigger-a-stimulus-with-the-mouse/3093>\
**Category:** Builder\
**Created:** [September 20, 2017, 6:41pm UTC](https://discourse.psychopy.org/t/trigger-a-stimulus-with-the-mouse/3093 "2017-09-20T18:41:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathilde](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Mathilde](https://discourse.psychopy.org/u/Mathilde)\
**Post date:** [September 20, 2017, 6:41pm UTC](https://discourse.psychopy.org/t/trigger-a-stimulus-with-the-mouse/3093/1 "2017-09-20T18:41:55Z")

</div>

Hi everyone!

First I have to say two things : I have no knowledges about the coding process, and I am french (what makes things not easy).

What I want to do on PsychoPy, is for me something simple, so I hope someone could help me. I just want to show a stimulus (here a polygon object) after the participant press/click the mouse.  
So I try to write in start properties "$mouse1.status==PRESSED"  
By selecting condition instead of duration.

I have tried this because I see this on differents Websites. But for me it doesn’t work.

Is there someone here who have used a mouse to provoque the appearence of a stimuli?  
As I explained before I would prefere something in the builder view.

Thank you for your help.  
Mathilde

---

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/michael/32/16_2.png) [@Michael](https://discourse.psychopy.org/u/Michael)\
**Post date:** [September 21, 2017, 10:24pm UTC](https://discourse.psychopy.org/t/trigger-a-stimulus-with-the-mouse/3093/2 "2017-09-21T22:24:16Z")

</div>

Hello Mathilde,

You might be able to achieve this without any code at all, by splitting your trial across several consecutive routines.

e.g. on the first routine, have a mouse component that is set to end the routine when a button is clicked. On the second routine, have a polygon component set to display from the beginning of the routine. No code required (although maybe you have other requirements that make this simple arrangement not very suitable).

---

<div class="post-metadata">

**Author:** ![Mathilde](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Mathilde](https://discourse.psychopy.org/u/Mathilde)\
**Post date:** [September 22, 2017, 10:01am UTC](https://discourse.psychopy.org/t/trigger-a-stimulus-with-the-mouse/3093/3 "2017-09-22T10:01:16Z")

</div>

Hi michael

Thank you very much for this idea. I try your idea this morning and that is exactly what I want to obtain. So this is a very good way to workaround what doesnt work !

Thanks for your help!  
Mathilde
