Page 1 of 1

A4Tech X7 Anti-Vibrate enable script

Posted: 09 Aug 2020, 09:11
by Sefrautic
Hi, I'm tired of manually enabling Auto-Vibrate feature after each time I wake up\restart the PC or simply unplugging the mouse. It's just resets every time when one of the above happens. I asked support but they're not answering.
Sooo the question is, can I somehow automate this process rather than manually doing it every time I'm using my PC? Specifically when I reconnect a mouse, at startup and after sleep. And I mean the smart way, if that possible (without autoclicking on pixel coordinates).

To reach these options I have to right-click on X7 software (Oscar) icon in the tray. Sorry for russian.
macro.jpg
macro.jpg (64.06 KiB) Viewed 1771 times
And then the left window appears in which I need to first click on "Enable" and then set Height to "4", then click "Ok".
Shortly after that another window opens where it asks to confirm that mouse is working by pressing "Ok".
2020-08-09_165633.jpg
2020-08-09_165633.jpg (26.88 KiB) Viewed 1771 times
That's the whole process.

Re: A4Tech X7 Anti-Vibrate enable script

Posted: 09 Aug 2020, 09:23
by swagfag
u can detect ur plugging the mouse in with a WM_DEVICECHANGED OnMessage() handler

about automating the UI, id suggest poking around to see if u can post some messages to it

Re: A4Tech X7 Anti-Vibrate enable script

Posted: 09 Aug 2020, 09:53
by Sefrautic
swagfag wrote:
09 Aug 2020, 09:23
about automating the UI, id suggest poking around to see if u can post some messages to it
What do you mean? I'm quite a noob in AHK, actually. It would help if anybody post some links with articles or tutorials, so I can understand in which direction I need to be moving at least.

Re: A4Tech X7 Anti-Vibrate enable script

Posted: 09 Aug 2020, 10:34
by swagfag
its not an AHK thing, its a windows thing - a programming pattern for structuring GUI applications https://docs.microsoft.com/en-us/windows/win32/learnwin32/window-messages

eg(with made up message names): when u right click ur mouse driver tray icon, windows sends to ur mouse driver application the message TRAY_ICON_RIGHT_CLICKED. if the application is designed to respond to such a message, it does so and, presumably, displays a tray menu in response to it. if it wasnt designed to handle the message, its simply ignored and nothing interesting happens. now, u had to right click with ur mouse to cause this message to be emitted, however, what u could do instead is use Send/PostMessage() to programmatically dispatch the message to the application, thereby circumventing the need to actually right click its tray icon(ie "automating it")

now, there could be a custom message, unique to the application, to which it responds by straight up changing ur vibration mode, thereby circumventing the need to actually right click its tray icon and go through several dialogs, setting a bunch of drop-downs, filling checkboxes and hitting buttons. i don't know if there is such a message and neither do u. u can A) go and ask the developers(which im more than 99% sure they'll blow u off) or B) poke around a bit, looking with a message monitor(of which there are plenty to choose from on the internet), and see what kinds of messages the application processes in response to various events. then u can try sending those that seem particularly interesting