mausuHoldo: poggers func + mouse btn stuck fix? added todos
This commit is contained in:
parent
f170721a7a
commit
0c45759f9a
1 changed files with 66 additions and 128 deletions
192
mausuHoldo.ahk
192
mausuHoldo.ahk
|
|
@ -1,7 +1,9 @@
|
||||||
|
;;TODO: calcular tuckaway con getpos en launch y pensar en multiscreen
|
||||||
|
;; poner clics laterales del raton
|
||||||
|
;; comprobar puntero en local
|
||||||
|
;; ugly af lo de flagear para compartir un sincro sin sincro, bro. no creo que lo cambie xddd
|
||||||
|
;;
|
||||||
;;eveentos down del teclado no paraban de joder porque paraban el unico hilo, so _h it was, its threading time
|
;;eveentos down del teclado no paraban de joder porque paraban el unico hilo, so _h it was, its threading time
|
||||||
;;vaya puto apañazo de mierda, flipas
|
|
||||||
;;obs lo rompe wtf??????????????? y relive caputrar la pantalla basically
|
|
||||||
;;TODO ugly af no entrar en el mutex. bro q te pasa, habia prisa pero......
|
|
||||||
#MaxThreadsPerHotkey 2
|
#MaxThreadsPerHotkey 2
|
||||||
#HotkeyInterval 10000
|
#HotkeyInterval 10000
|
||||||
#MaxHotkeysPerInterval 9999
|
#MaxHotkeysPerInterval 9999
|
||||||
|
|
@ -32,30 +34,44 @@ rBtnHold := 0
|
||||||
mBtnHold := 0
|
mBtnHold := 0
|
||||||
lBtnHold := 0
|
lBtnHold := 0
|
||||||
|
|
||||||
speedUp := 1
|
defaultSpeed := 10
|
||||||
speedUpFactor := 20
|
slowDown := 0
|
||||||
|
slowDownFactor := 90
|
||||||
|
|
||||||
test1 := 0
|
test1 := 0
|
||||||
test2 := 0
|
test2 := 0
|
||||||
test3 := 0
|
test3 := 0
|
||||||
test4 := 0
|
test4 := 0
|
||||||
|
|
||||||
share:=CriticalObject({"lefMov" : 0,"rightMov" : 0,"downMov" : 0,"upMov" : 0,"mouseSpeed" : speedUp * speedUpFactor + 3})
|
;;pressMouseButton("Left", lBtnHold, u)
|
||||||
|
pressMouseButton(ByRef mouseButton, ByRef toggleState, ByRef keyPressed, ByRef toggle := 0)
|
||||||
;;Toggle speed
|
{
|
||||||
RCtrl & ,::
|
Global mouseActive
|
||||||
;;SendInput, {RCtrl Up}
|
if(mouseActive == 1)
|
||||||
speedUp := !(speedUp)
|
{
|
||||||
mouseSpeed := speedUp * speedUpFactor + 3
|
if (toggleState == 1)
|
||||||
;;SendInput, {RCtrl Down}
|
{
|
||||||
|
MouseClick, %mouseButton%, , , 1, , U
|
||||||
|
toggleState := 0
|
||||||
return
|
return
|
||||||
|
}
|
||||||
;;tuckaway
|
if (toggleState == 0 && toggle == 1)
|
||||||
;;targeting 1080p displays with taskbar on top. Change at your leisure.
|
{
|
||||||
RCtrl & .::
|
MouseClick, %mouseButton%, , , 1, , D
|
||||||
MouseMove, 1940, 100
|
toggleState := 1
|
||||||
;;inputCleaning()
|
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
if (toggle == 0)
|
||||||
|
{
|
||||||
|
MouseClick, %mouseButton%
|
||||||
|
return
|
||||||
|
}
|
||||||
|
KeyWait, %keyPressed%
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
share:=CriticalObject({"lefMov" : 0,"rightMov" : 0,"downMov" : 0,"upMov" : 0,"mouseSpeed" : slowDown * slowDownFactor + defaultSpeed})
|
||||||
|
|
||||||
;;TODO DAVBID Y EL ENTER
|
;;TODO DAVBID Y EL ENTER
|
||||||
LAlt & RAlt::
|
LAlt & RAlt::
|
||||||
|
|
@ -79,7 +95,7 @@ RAlt & LAlt::
|
||||||
DllCall(freqUpdater, ""Int64*"" , baseTime)
|
DllCall(freqUpdater, ""Int64*"" , baseTime)
|
||||||
DllCall(freqUpdater, ""Int64*"" , currentTime)
|
DllCall(freqUpdater, ""Int64*"" , currentTime)
|
||||||
DllCall(""QueryPerformanceFrequency"", ""Int64*"", updateRate)
|
DllCall(""QueryPerformanceFrequency"", ""Int64*"", updateRate)
|
||||||
ticksPerSecond := 10000
|
ticksPerSecond := 1000
|
||||||
updateRate := Floor(updateRate / ticksPerSecond)
|
updateRate := Floor(updateRate / ticksPerSecond)
|
||||||
currentTime := currentTime ;;/ 1.0
|
currentTime := currentTime ;;/ 1.0
|
||||||
baseTime := baseTime ;;/ 1.0
|
baseTime := baseTime ;;/ 1.0
|
||||||
|
|
@ -100,7 +116,7 @@ RAlt & LAlt::
|
||||||
DllCall(freqUpdater, ""Int64*"" , currentTime)
|
DllCall(freqUpdater, ""Int64*"" , currentTime)
|
||||||
if (currentTime - baseTime >= updateRate) {
|
if (currentTime - baseTime >= updateRate) {
|
||||||
delta := (currentTime - baseTime) / ticksPerSecond
|
delta := (currentTime - baseTime) / ticksPerSecond
|
||||||
MouseMove, (obj.rightMov + obj.lefMov) * (delta), (obj.upMov + obj.downMov) * (delta), 0, R
|
MouseMove, (obj.rightMov + obj.lefMov) * (delta / obj.mouseSpeed), (obj.upMov + obj.downMov) * (delta / obj.mouseSpeed), 0, R
|
||||||
;;DllCall(freqUpdater, ""Int64*"" , baseTime)
|
;;DllCall(freqUpdater, ""Int64*"" , baseTime)
|
||||||
baseTime := currentTime
|
baseTime := currentTime
|
||||||
}
|
}
|
||||||
|
|
@ -128,6 +144,27 @@ RAlt & LAlt::
|
||||||
return
|
return
|
||||||
|
|
||||||
#if mouseActive == 1
|
#if mouseActive == 1
|
||||||
|
|
||||||
|
;;Toggle speed
|
||||||
|
'::
|
||||||
|
h::
|
||||||
|
Global share
|
||||||
|
;;SendInput, {RCtrl Up}
|
||||||
|
slowDown := !(slowDown)
|
||||||
|
share.mouseSpeed := slowDown * slowDownFactor + defaultSpeed
|
||||||
|
;;SendInput, {RCtrl Down}
|
||||||
|
return
|
||||||
|
|
||||||
|
;;tuckaway
|
||||||
|
;;targeting 1080p displays with taskbar on top. Change at your leisure.
|
||||||
|
p::
|
||||||
|
y::
|
||||||
|
;;DllCall("ShowCursor", "Int", slowDown)
|
||||||
|
MouseMove, 1940, 100
|
||||||
|
;;inputCleaning()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
$j::
|
$j::
|
||||||
if (test1 == 0)
|
if (test1 == 0)
|
||||||
{
|
{
|
||||||
|
|
@ -177,133 +214,34 @@ k Up::
|
||||||
return
|
return
|
||||||
|
|
||||||
$u::
|
$u::
|
||||||
if (mouseActive == 1)
|
pressMouseButton("Left", lBtnHold, u)
|
||||||
{
|
|
||||||
if(lBtnHold == 1)
|
|
||||||
{
|
|
||||||
SendInput, {LButton Up}
|
|
||||||
lBtnHold := 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, {LButton}
|
|
||||||
}
|
|
||||||
KeyWait, u
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, u
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
u Up::return
|
u Up::return
|
||||||
|
|
||||||
$m::
|
$m::
|
||||||
if (mouseActive == 1)
|
pressMouseButton("Left", lBtnHold, m, 1)
|
||||||
{
|
|
||||||
if(lBtnHold == 1)
|
|
||||||
{
|
|
||||||
SendInput, {LButton Up}
|
|
||||||
lBtnHold := 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, {LButton Down}
|
|
||||||
lBtnHold := 1
|
|
||||||
}
|
|
||||||
KeyWait, m
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, m
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
m Up::return
|
m Up::return
|
||||||
|
|
||||||
$i::
|
$i::
|
||||||
if (mouseActive == 1)
|
pressMouseButton("Middle", mBtnHold, i)
|
||||||
{
|
|
||||||
if(mBtnHold == 1)
|
|
||||||
{
|
|
||||||
SendInput, {MButton Up}
|
|
||||||
mBtnHold := 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, {MButton}
|
|
||||||
}
|
|
||||||
KeyWait, i
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, i
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
i Up::return
|
i Up::return
|
||||||
|
|
||||||
$sc033::
|
$sc033::
|
||||||
if (mouseActive == 1)
|
pressMouseButton("Middle", mBtnHold, sc033m, 1)
|
||||||
{
|
|
||||||
if(mBtnHold == 1)
|
|
||||||
{
|
|
||||||
SendInput, {MButton Up}
|
|
||||||
mBtnHold := 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, {MButton Down}
|
|
||||||
mBtnHold := 1
|
|
||||||
}
|
|
||||||
KeyWait, `,
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, `,
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
sc033 Up::return
|
sc033 Up::return
|
||||||
|
|
||||||
$o::
|
$o::
|
||||||
if (mouseActive == 1)
|
pressMouseButton("Right", rBtnHold, o)
|
||||||
{
|
|
||||||
if(RBtnHold == 1)
|
|
||||||
{
|
|
||||||
SendInput, {RButton Up}
|
|
||||||
mBtnHold := 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, {RButton}
|
|
||||||
}
|
|
||||||
KeyWait, o
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, o
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
o Up::return
|
o Up::return
|
||||||
|
|
||||||
$.::
|
$.::
|
||||||
if (mouseActive == 1)
|
pressMouseButton("Right", rBtnHold, ".", 1)
|
||||||
{
|
|
||||||
if(rBtnHold == 1)
|
|
||||||
{
|
|
||||||
SendInput, {RButton Up}
|
|
||||||
mBtnHold := 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, {RButton Down}
|
|
||||||
mBtnHold := 1
|
|
||||||
}
|
|
||||||
KeyWait, `.
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, `.
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
|
. Up::return
|
||||||
|
|
||||||
#if
|
#if
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue