Jump to content

Swapping mouse buttons


sshrum
 Share

Recommended Posts

One of the guys I work with is right handed but he sets his mouse to right button primary.

Rule around work is when a person is on vacation, we get to prank him (since he's out, it gives us time to set up booby traps). :)

I want to write a script that would swap his mouse buttons. I can set up a timer that would switch it at random intervals but I need the code to do the swapping without actually popping up the mouse control panel.

I already hit him with my execute app (allows a person to execute commands on other PCs by monitoring a launch file) so he'll know what is going on if I hit him with that again.

If anybody has any other prank-like ideas/code...throw it my way...I need to get this guy back for when I was on vacation. :P

TIA

Edited by sshrum

Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Link to comment
Share on other sites

  • Moderators

You could use the SwapMouseButton api call in the user32.dll.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Help me out...what is the call that would do it.

TIA

I don't know, I hadn't used it... look it up on MSDN, or do a search for SwapMouseButton to see if anyones done it yet.

Edit:

http://www.autoitscript.com/forum/index.ph...SwapMouseButton

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...