Thank you keep supporting this awsome project
I made simple test script for reducing recoil in fps games
Just replaced dallcall mouse event to AHI.SendMouseMove
When I checked Monitor.ahk, both mouse move events are displayed, which is my mouse move and AHI script move (when dllcall, mouse move event never showed up)
Question is am I use AHI correctly? Because I can't say i'm fully understand
Goal is avoid Dllcall event and make scripted move looks like raw-input
And test script seems almost works fine but when variable x or y is not the number, Error window pops out
Description is "Error in #include file \Lib\AutoHotInterception.ahk 0x80004002 interface is not supported"
This thing never happen when i use normal AHK commands
After same fix,I could avoid this error. But Can i fix this problem?
Code: Select all
#SingleInstance force
#Persistent
#include Lib\AutoHotInterception.ahk
global AHI := new AutoHotInterception()
global mouseid := AHI.GetMouseId(HID, VID)
no_pattern :={} ; cause error when using "|| a_index > active_pattern.maxindex()"
a_pattern := {1: "10,10", 2: "0,10", 3: "-10,10"
,4: "20,20", 5: "0,20", 6: "20,20" ,7: "0,0"}
active_pattern:=no_pattern
1::
active_pattern:=a_pattern
return
3::
sleep 10
loop % active_pattern.maxindex() ; added :fix error
{
x:=strsplit(active_pattern[a_index],",")[1]
y:=strsplit(active_pattern[a_index],",")[2]
AHI.SendMouseMoveRelative(mouseid, x, y)
sleep, 150
} until !GetKeyState(3,"P") ; || a_index > active_pattern.maxindex() ----removed :cause error
sleep 500
return
^Esc::
ExitApp