# How to get mouse to click

**URL:** https://discourse.processing.org/t/how-to-get-mouse-to-click/13633
**Category:** Coding Questions
**Created:** [August 26, 2019, 10:48pm UTC](https://discourse.processing.org/t/how-to-get-mouse-to-click/13633 "2019-08-26T22:48:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kjiiller](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@kjiiller](https://discourse.processing.org/u/kjiiller)
#### Post date: [August 26, 2019, 10:48pm UTC](https://discourse.processing.org/t/how-to-get-mouse-to-click/13633/1 "2019-08-26T22:48:02Z")

</div>

Sorry, I’m pretty new to coding, so I don’t know much. I was wondering if it’s possible to use processing to click your mouse like an auto clicker. From what I’ve seen it’s either impossible or extrememely easy:). Thank-you

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [August 26, 2019, 11:05pm UTC](https://discourse.processing.org/t/how-to-get-mouse-to-click/13633/2 "2019-08-26T23:05:46Z")

</div>

> [@kjiiller](#):
>
> click your mouse like an auto clicker

processing see only mouse click inside its own canvas  
also is by JAVA for security reasons the possibility to operate other programs limited…

for my understanding a  
auto clicker is a program what emulates mouse clicks on other windows ( programs )  
or at specific screen pix.

- processing has access only to its own canvas ( size() )

also it would mean that you NOT click your mouse as that program does it for you,

- so your wording might indicate that you have a other understanding

* * *

but as this here is about learning processing,  
start with a short sketch following

> **[mousePressed() / Reference](https://processing.org/reference/mousePressed_.html)**
>
> The mousePressed() function is called once after every time a mouse button is pressed. The mouseButton variable (see the related reference entry) can be used to determine which button ha…

and post your code if you have further questions

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [August 26, 2019, 11:35pm UTC](https://discourse.processing.org/t/how-to-get-mouse-to-click/13633/3 "2019-08-26T23:35:10Z")

</div>

> [@kjiiller](#):
>
> I was wondering if it’s possible to use processing to click your mouse like an auto clicker.

- [Tagged with index.html - Processing 2.x and 3.x Forum](http://Forum.Processing.org/two/discussions/tagged?Tag=robot.mousemove())
- [Search results for 'robot.mousemove' - Processing Foundation](http://Discourse.Processing.org/search?expanded=true&q=robot.mousemove#processing)
