I need your help in my script.
There seems to be a problem where either SubscribeMouseButton or ObjBindMethod is only going to work.
Code: Select all
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
Process, Priority, , R
SetBatchLines, -1
SetKeyDelay, -1, -1, -1
SetMouseDelay, -1
SetControlDelay, -1
SetDefaultMouseSpeed, 0
SendMode Input
SetWorkingDir %A_ScriptDir%
#Persistent
#include C:\Users\Lenovo\Documents\AutoHotKey\Lib\AutoHotInterception.ahk
AHI := new AutoHotInterception()
mouseId := AHI.GetMouseId(0x25A7, 0xFA23)
AHI.SubscribeMouseButton(mouseId, 5, true, Func("WheelEvent"))
return
WheelEvent(){
{
Click right down
sleep 8
Click right up
}
CPS := []
SetTimer showCPS, 10
showCPS:
if (Cps.Count() > 3) {
DllCall("Sleep", "UInt", 10)
Click down
DllCall("Sleep", "UInt", 10)
Click up
}
return
~*LButton Up::
CPS.Push(A_TickCount)
fn := ObjBindMethod(CPS, "Pop")
SetTimer % fn, -400
return
I'm sorry if the mistake I made was extremely obvious because I'm a begginer on this.