autoside Posted March 4, 2019 Posted March 4, 2019 I'm trying to make a script that slows down my mouse sensitivity when a certain event is happening, and then reverts to normal after the event is over. I got this code to work, but the problem is that it doesn't have any effect on my mouse speed when I'm tabbed into the program I'm trying to use it for. Is there anything I can do to get it to work in a specific program? Or even another way of doing this code. #Include <WinAPIEx.au3> Global $SpeedOrig = RegRead("HKCU\Control Panel\Mouse", "MouseSensitivity") _WinAPI_SystemParametersInfo(113, 0, 1, 2) ; 1 = slowest Sleep(2000) _WinAPI_SystemParametersInfo(113, 0, 20, 2) ; 20 = fastest Sleep(2000) _WinAPI_SystemParametersInfo(113, 0, $SpeedOrig, 2)
faustf Posted March 4, 2019 Posted March 4, 2019 (edited) look in help F1 with word cursor or try to refresh registry ProcessClose("explorer.exe") Run ("explorer.exe") Edited March 4, 2019 by faustf
Nine Posted March 4, 2019 Posted March 4, 2019 (edited) Your program needs to capture the WM_SETTINGCHANGE message. Looks like it doesn't. Maybe it is because this program ensure itself of mouse speed ? You could try to use 3 as the last parameter. ps. I tested on multiple applications, and it is working fine. I wonder what is the program you're talking about ? Edited March 4, 2019 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
autoside Posted March 4, 2019 Author Posted March 4, 2019 (edited) 4 hours ago, Nine said: Your program needs to capture the WM_SETTINGCHANGE message. Looks like it doesn't. Maybe it is because this program ensure itself of mouse speed ? You could try to use 3 as the last parameter. ps. I tested on multiple applications, and it is working fine. I wonder what is the program you're talking about ? Its a video game I'm trying to make it work in, so I guess it might read input differently. For example, a script that makes the cursor go downward while holding a key flips out in-game. The parameter change didn't work. I wonder if there's a way to pull the mouse speed from my mouse drivers (Razer Synapse) instead. Edited March 4, 2019 by autoside
Moderators JLogan3o13 Posted March 5, 2019 Moderators Posted March 5, 2019 Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts