28 comments

[ 2.8 ms ] story [ 78.9 ms ] thread
What an insane but effective solution! Kudos!
We still don't know WHY he was doing this, so it's a little bit to early to call this "effective". As someone mentioned "while true; do xdotool click 1; sleep 60; done"
Well, your alternative may be more efficient, but it is not more effective. Scnr.
Yes, it is effective. It works. It has the intended effect. That is literally the definition of "effective".
As the meme goes, "You can do it with a 555" - and a spare mouse, in his case.

Or you can do it with an Arduino (if it has a 32U4 chip for USB HID).

I made KeyMouSerial to take keystrokes, mouse movement, and mouse clicks on my laptop and send them to another computer via an Arduino.

http://peterburk.github.io/programs/#keyMouSerial

I know you said you didn't want to go into why you needed this, but I am curious: why did you need this (preventing your machine from going to sleep I imagine?), and why didn't `while true; do xdotool click 1; sleep 60; done` do the job? (no logged in user, perhaps?)
I think that everyone is curious, and the reasoning is likely not as complex as the author says it is. I'd wager that it's either an embarrassing use case, or that he wanted to avoid having people tell him how he should have done it - can't do that with any level of confidence if you don't know the circumstances.
Sounds like wanting to stay logged in an online game which has cheat detection going on.
I'm pretty sure online games like that (e.g. Runescape) also check intervals between clicks, this one seems pretty constant. But Runescape can't detect clicking tools running themselves iirc, so they've got other means of detecting bots (random events)
Runescape runs in the browser so its anti cheat mechanisms are very limited I imagine. I'm pretty sure most MMOs (which run as installed applications) have more involved cheat detection going on.
These days Runescape (RS3 anyway) is an installed app rather than a browser plugin.
While that is the case, you can get around this by using Mousekeys. I've actually set up a little machine to hit 5 on the numpad to click every few game ticks. From the game's perspective, I'm not cheating. But it is a hardware solution because a software one would be easily detected.

Also random events don't exist in Runescape 3, only Old School Runescape. The anti-bot technology implemented in RS3 doesn't seem to have been ported over to the older version of the game yet, perhaps due to it running on an older version of the game's engine.

Probably because bots ended up beating random events and they just use other, better tech now
guess - company machine - think a bank - has all usb ports blocked - company has locked ability to install software - access to corporate network via vpn has predictable timeout
Wow... so close. Now hypothetically throw 3x nested RDPs into the mix. ;)
When your only tool is a hammer everything looks like a nail.

This looks like a hardware guy looking for a hardware solution. Think me may have given up too easily on a software solution?

I expected to find a comment like this. It's easy to dismiss something and make a cutting remark, rushing to assume that the obvious solution has been missed. I'm glad the OP has posted with the reasons, to make you look at least a little foolish.
(comment deleted)
OK thanks for the comments everyone...

Some answers:

1. No, I'm not cheating at a game.

2. No, it's not some sort of auto-clicker for the web.

3. The machine in question is VERY locked down. I cannot install any software onto it, and I cannot plug in any extra devices other than a single mouse and single keyboard (It doesn't even like my KVM switch). It's locked down for very good reason which under normal usage I agree with, however, I have specific development purposes that require this hack. I also WFH, so security of the machine is already taken care of. (If someone I don't know is in my house... I've got bigger problems.)

4. I only use the clicker while I am working and the machine is next to me - I never leave the machine unattended whilst logged in.

5. I've been using it for a few days now, and it's a godsend, It's made my current day job so much easier.

Do you think this programmable mouse jiggler might have done the trick? https://www.cru-inc.com/products/wiebetech/mouse_jiggler/ By itself it doesn't solve the problem of cutting back in with the mouse when you need to work, but there's probably a USB switch box for that.
That might have worked. However I discovered that the machine wouldn't talk to my mouse or keyboard through my KVM switch (as it introduces a USB hub into the path), so my guess is that I wouldn't be able to switch from the jiggler to the real mouse.
So.. What is the machine doing? Is this like the button in lost?