Ryochan7 / DS4Windows

Like those other ds4tools, but sexier
https://ryochan7.github.io/ds4windows-site/
GNU General Public License v3.0
6.94k stars 807 forks source link

Can I click the mouse at a specific location? #1269

Open vanclute opened 4 years ago

vanclute commented 4 years ago

I'm using this to control a software application (not a game), and I need a macro to move the mouse to a specific location and click. Is this possible? I can't figure out how to do it.

Ryusennin commented 4 years ago

The macro system is used for remapping keys/buttons, not for complex scripts like CronusMax.

vanclute commented 4 years ago

Damn. I need to be able to click on a popup that appears after I launch Loom, it asks which monitor I want to record. I always want to record the same one, there is no way to set a default and no way to select it with the keyboard (enter, etc.). Any suggestions on how I can automate this click at a specific place on the screen? AHK?

mika-n commented 4 years ago

If you use DS4 gamepad to do all sort of things it supports and additionally need to have a ds4 gamepad key to do this special "click a mouse btn at certain screen X/Y position" trick then you could use an external app to do that "move to X/Y mouse point and generate left mouse click event". DS4Windows has specialActions you can bind to a certain gamepad key. There are several actions, but one of those is "Launch a program". This external program can do what DS4Windows cannot do out of the box. The external app or batch script could simulate the X/Y mouse move and click by using AutoHotKey library or any other library doing the same. Or create your own PowerShell or C# app to do it.

Ryochan7 commented 4 years ago

There is no absolute mouse support in DS4Windows. I have never had a use for it as of yet. The only use case I would have for it would be if I would go back to play Torchlight 2 at some point. Also, I am not sure how to deal with multi-monitor support issues. That issue was never resolved with my old program.

Ryochan7 commented 3 years ago

It would never be added to DS4Windows but I have a weird use case where such functionality would come in handy. Currently playing a weeb SAO game and mouse camera is a bit jank in the game. Camera rotation is started by engaging Right Mouse Button and the camera stops rotating once the mouse cursor reaches the border. The cursor does not re-center when disengaging the Right Mouse button so resuming camera rotation can lead to the cursor reaching the edge of the screen and the stop of camera rotation. It can be a bit annoying.

It would be nice if there were a way to force mouse re-centering after releasing the virtual Right Mouse Button (bound to L2 in my profile). That way a larger camera pan would be possible in many cases. I don't think that behavior would interfere with other mouse actions in the game. Besides having some form of absolute mouse button action, there would have to be a way to start an action on button release as well. The button release issue would be the primary reason such functionality would never be added to DS4Windows.

Ryochan7 commented 3 years ago

With that action being bound to L2, it might be possible to take advantage of the new Two Stage Trigger functionality to handle the release case. Two Stage Exclusive mode could possibly handle swapping between Right Mouse Button (Full Pull) and mouse re-centering (Soft Pull).