From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIY LabVIEW Crew Blog

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Waterloo Labs: DIY IP for automating mouse clicks

Rick_K
NI Employee (retired)

We all know Waterloo Labs is doing some awesome DIY stuff, but so far the general DIY usefulness has been low while awesomeness skyrockets (typical engineering tradeoff situation). Their latest first person shooter with real guns is no exception on the awesomeness scale. I especially love the detailed pdf they made explaining the math behind the vibration triangulation algorithm. One thing, however, intrigued me about their implementation that gives them some points on the "useful" scale. In order to interact with the game on the computer they automate mouse clicks in a program outside of LabVIEW. As you may know interacting with a mouse/joystick/keyboard is possible with LabVIEW built-in functions, but interacting with these I/O devices with LabVIEW in the background is not trivial at first glance. Waterloo Labs automates the mouse in the computer game using calls into the Windows user32.dll. They graciously provide a downloadable version of reusable functions with the call library nodes already set up correctly to "set cursor position" and "generate click."

mouse download.png

Hopefully your wheels are already turning about things you can automate with this clicking power. Certainly some intelligent macros for any existing computer program sounds like a good start. Perhaps a program that clicks the refresh button in your email client all day. Someone could create the perfect undetectable LabVIEW-based Poker bot or an auto-Warcraft gold miner. However, I would love to see someone create the best windows settings changer ever. Triggered when your coworker gets back from lunch, his/her monitor picture goes upside down, the background color turns hot pink, millions of windows start opening, the mouse reverses movement and the buttons get switched, the volume is set to 11, and "Girls Just Wanna Have Fun" fills the office though the speakers... just a thought. (but seriously if you create anything like this send it to me ASAP)