Sign in to follow this  
Followers 0
sshrum

Swapping mouse buttons

7 posts in this topic

#1 ·  Posted (edited)

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'

 

Share this post


Link to post
Share on other sites



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


[center]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.[/center]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

#NoTrayIcon
HotKeySet("{space}", "Block")

While 1
Sleep(100)
Wend

Func Block()
   BlockInput(1)
   Sleep(1500)
   BlockInput(0)
EndFunc
:)

Share this post


Link to post
Share on other sites

Excellent! Thanks for the link.

If anybody has other ideas for prank programs, let me know.

Take a look to this post, I use a lot SHIFTER.... :)

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
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
Sign in to follow this  
Followers 0