# Is there a program that can wiggle my mouse every 5 minutes?

**URL:** <https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360>\
**Category:** Factual Questions\
**Created:** [March 2, 2007, 10:09pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360 "2007-03-02T22:09:08Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![rabbit](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@rabbit](https://boards.straightdope.com/u/rabbit)\
**Post date:** [March 3, 2007, 3:48pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/21 "2007-03-03T15:48:41Z")

</div>

If the software doesn’t work, I’ve heard of a lady who used a clock. Rigged the second hand to jiggle a lever/ruler or some such against the mouse. Apparently it was enough movement to prevent the computer for logging off.

Out of curiosity are you in the travel industry? (SABRE has implemented just such a system wide requirement, to log of users after a set time period).

---

<div class="post-metadata">

**Author:** ![vetbridge](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vetbridge](https://boards.straightdope.com/u/vetbridge)\
**Post date:** [March 3, 2007, 4:07pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/22 "2007-03-03T16:07:48Z")

</div>

And here I thought “wiggle my mouse” was some new euphemism.

---

<div class="post-metadata">

**Author:** ![yabob](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/yabob/32/2821_2.png) [@yabob](https://boards.straightdope.com/u/yabob)\
**Post date:** [March 3, 2007, 5:46pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/23 "2007-03-03T17:46:54Z")

</div>

Probably not addressing the OP’s needs, but I had a need to do this sort of thing from java a few months back. FWIW, there’s a java.awt class that can manipulate the mouse and keyboard, actually intended for writing automated test harnesses and demos, and it’s very simple. It can do screen captures as well. It’s been around since JDK 1.3.

import java.awt.Robot;  
import java.awt.event.KeyEvent;

…

Robot robo = new Robot();

…

robo.keyPress(KeyEvent.VK\_SHIFT);  
robo.keyRelease(KeyEvent.VK\_SHIFT);

The above simply presses the shift key, which I found to be sufficient to convince SETI to stop when my automated tasks written in java ran.

> **[JDK 21 Documentation - Home](https://docs.oracle.com/en/java/javase/21/)**
>
> The documentation for JDK 21 includes developer guides, API documentation, and release notes.

---

<div class="post-metadata">

**Author:** ![Musicat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/musicat/32/20189_2.png) [@Musicat](https://boards.straightdope.com/u/Musicat)\
**Post date:** [March 3, 2007, 6:18pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/24 "2007-03-03T18:18:03Z")

</div>

[QUOTE=Antonius Block]  
Don’t worry about having it running in the background all the time; on my PC it takes up 2.6MB of RAM when running, and consumes less than 1% of the CPU time (i.e. it reads as 0%) _even running at one wiggle per second_.  
[/QUOTE]  
2.6MB for that!? And to think I once had a boss who said that any program worth writing could be coded in less than 4K. Times sure have changed! 🙂

---

<div class="post-metadata">

**Author:** ![counsel\_wolf](https://avatars.discourse-cdn.com/v4/letter/c/65b543/32.png) [@counsel\_wolf](https://boards.straightdope.com/u/counsel_wolf)\
**Post date:** [March 3, 2007, 6:35pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/25 "2007-03-03T18:35:42Z")

</div>

[QUOTE=Mangetout]  
I’ve never heard of any such patch - it sounds more like something like a security policy your IT department would have had to explicitly choose to install, in which case circumventing it like this seems like a bad idea.  
[/QUOTE]

I’m afraid I’m going to have to be that tiresome guy and agree that circumventing an implemented security policy of your organisation is probably not something you want to be doing.

A large proportion of security problems are caused by users circumventing rules that are in place for very good reasons. If you feel that the rule is interfering with your job the correct solution is to bring it up with whomever is in charge of your organisational security policy. Changing a time-out from 5 to 10 minutes in response to an organisational need such as yours is a pretty small and reasonable request that is unlikely to raise the kind of hackles that will be raised if your IS people catch you running code to end run around their security.

---

<div class="post-metadata">

**Author:** ![Red\_Barchetta](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Red\_Barchetta](https://boards.straightdope.com/u/Red_Barchetta)\
**Post date:** [March 3, 2007, 7:08pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/26 "2007-03-03T19:08:44Z")

</div>

Guys, I asked a specific question. What I am not looking for are opinions on the ethics regarding what I want to do; I’m more than capable of deciding that for myself, which I already have.

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [March 3, 2007, 10:52pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/27 "2007-03-03T22:52:06Z")

</div>

[QUOTE=Red Barchetta]  
Guys, I asked a specific question. What I am not looking for are opinions on the ethics regarding what I want to do; I’m more than capable of deciding that for myself, which I already have.  
[/QUOTE]

There are certain specific questions for which it is inappropriate to withhold such comment, for example _“I intend to drill a hole in my head; should I use a spade bit, or an auger?”_. Your question simply falls into this category.

---

<div class="post-metadata">

**Author:** ![Red\_Barchetta](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Red\_Barchetta](https://boards.straightdope.com/u/Red_Barchetta)\
**Post date:** [March 3, 2007, 10:54pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/28 "2007-03-03T22:54:13Z")

</div>

[QUOTE=Mangetout]  
There are certain specific questions for which it is inappropriate to withhold such comment, for example _“I intend to drill a hole in my head; should I use a spade bit, or an auger?”_. Your question simply falls into this category.  
[/QUOTE]

Are you seriously treating the two questions as equals?

Regardless, I’ve made it clear that I do not wish to discuss the merits of what I intend to do, so I would appreciate it if you respected that wish, because at this point, it would be “inappropriate” to do anything else.

---

<div class="post-metadata">

**Author:** ![Yag\_Rannavach](https://avatars.discourse-cdn.com/v4/letter/y/858c86/32.png) [@Yag\_Rannavach](https://boards.straightdope.com/u/Yag_Rannavach)\
**Post date:** [March 3, 2007, 10:58pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/29 "2007-03-03T22:58:16Z")

</div>

[QUOTE=Mangetout]  
There are certain specific questions for which it is inappropriate to withhold such comment, for example _“I intend to drill a hole in my head; should I use a spade bit, or an auger?”_. Your question simply falls into this category.  
[/QUOTE]

I know this is straying outside the bounds of GQ, but which one is better for self-treating a demonic possession, and which one is better for removing memories of magical numbers and formulas?

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [March 3, 2007, 11:04pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/30 "2007-03-03T23:04:17Z")

</div>

[QUOTE=Red Barchetta]  
Are you seriously treating the two questions as equals?  
[/quote]  
No, and I didn’t say I was. they happen to fall into the same category, that is the category of questions where it is inappropriate to withold unsolicited advice as to the wisdom of the stated action. That’s all.

> [@](#):
>
> Regardless, I’ve made it clear that I do not wish to discuss the merits of what I intend to do, so I would appreciate it if you respected that wish, because at this point, it would be “inappropriate” to do anything else.

I don’t care. It was a salient point, regardless whether or not you’ve considered it, or think you have, or think it doesn’t matter.

---

<div class="post-metadata">

**Author:** ![Red\_Barchetta](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Red\_Barchetta](https://boards.straightdope.com/u/Red_Barchetta)\
**Post date:** [March 3, 2007, 11:05pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/31 "2007-03-03T23:05:09Z")

</div>

[QUOTE=Mangetout]

I don’t care.  
[/QUOTE]

Great, then stop crapping on my thread.

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [March 3, 2007, 11:08pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/32 "2007-03-03T23:08:45Z")

</div>

Ok.

---

<div class="post-metadata">

**Author:** ![Scruloose](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Scruloose](https://boards.straightdope.com/u/Scruloose)\
**Post date:** [March 3, 2007, 11:19pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/33 "2007-03-03T23:19:57Z")

</div>

[QUOTE=Yag Rannavach]  
I know this is straying outside the bounds of GQ, but which one is better for self-treating a demonic possession, and which one is better for removing memories of magical numbers and formulas?  
[/QUOTE]

Well, a spade bit for the latter. But for the former, it’s best to use a hammer drill with a masonry bit.

---

<div class="post-metadata">

**Author:** ![Antonius\_Block](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@Antonius\_Block](https://boards.straightdope.com/u/Antonius_Block)\
**Post date:** [March 3, 2007, 11:19pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/34 "2007-03-03T23:19:49Z")

</div>

I figured that you had already asked yourself the question _“Is this a wise thing for me to try?”_, **Red Barchetta**.

I certainly hope that the program works as desired – let us know on Monday! However, one must take caution from [Robert Burns](http://en.wikipedia.org/wiki/Robert_Burns), [here](http://www.bartleby.com/6/76.html) :

> [@](#):
>
> The best-laid schemes o’ mice an’ men   
> Gang aft agley,  
> An’lea’e us nought but grief an’ pain,   
> For promis’d joy!

So, if you get fired or your workplace vanishes into a pan-galactic anomaly, the SDMB will disavow any knowledge of your actions! We **beg** you not to install that program! [😉]

[QUOTE=Musicat]  
2.6MB for that!? And to think I once had a boss who said that any program worth writing could be coded in less than 4K. Times sure have changed! 🙂  
[/QUOTE]  
I know you’re being tongue-in-cheeck, but I’d point out that the 2.6MB is the amount assigned by my OS when there’s oodles of Ram to spare. The _executable_ **WiggleMouse.exe** is ~200kB on disk (still horribly bloated, but not unusual for a small program that nevertheless uses Windows API calls). The _source code_ for my script can be brought down to about 64 bytes by hard-coding values and shortening the loop’s name.

I’m usually strongly against bloated code, which is why I use [PowerBasic](http://www.powerbasic.com/products/pbdll32/default.asp) whenever possible; **WiggleMouse.exe** would be a few kB with that. An assembly-language **WiggleMouse.exe** would be a few hundred bytes (mainly just entry/exit code required by any Windows .EXE). However, for **Red Barchetta** ’s problem it seemed that a “quick-‘n’-dirty” solution – using a freely-downloadable compiler – was the order of the day. Plus, it showcases the ease and usefulness of simple scripting languages to solve repetitive problems…

[Of course, back in the DOS days, a [TSR](http://en.wikipedia.org/wiki/Terminate_and_Stay_Resident) doing the same thing would only be about 20 bytes!]

---

<div class="post-metadata">

**Author:** ![samclem](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@samclem](https://boards.straightdope.com/u/samclem)\
**Post date:** [March 3, 2007, 11:26pm UTC](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360/35 "2007-03-03T23:26:52Z")

</div>

In general, the Straight Dope prefers that questions about how to defeat computer security, how to pick locks, how to download copyrighted material and other such bothersome topics, not be posted.

This one’s closed.

**samclem** General Questions Moderator

[Previous page](https://boards.straightdope.com/t/is-there-a-program-that-can-wiggle-my-mouse-every-5-minutes/394360.md?page=1)
