mausu: keywait, 1st stable? w bg script start bat
This commit is contained in:
parent
9c7cea8368
commit
b7d3c1926d
2 changed files with 90 additions and 80 deletions
270
mausu.ahk
270
mausu.ahk
|
|
@ -3,9 +3,6 @@
|
||||||
;;https://www.autohotkey.com/boards/viewtopic.php?t=97706
|
;;https://www.autohotkey.com/boards/viewtopic.php?t=97706
|
||||||
DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr")
|
DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr")
|
||||||
|
|
||||||
;;For debugging purposes, it controls nothing, as it happens to us all with the flow of our lives
|
|
||||||
mouseActive := 0
|
|
||||||
|
|
||||||
rightMov := 0
|
rightMov := 0
|
||||||
lefMov := 0
|
lefMov := 0
|
||||||
upMov := 0
|
upMov := 0
|
||||||
|
|
@ -19,16 +16,17 @@ speedUp := 1
|
||||||
speedUpFactor := 20
|
speedUpFactor := 20
|
||||||
mouseSpeed := speedUp * speedUpFactor + 3
|
mouseSpeed := speedUp * speedUpFactor + 3
|
||||||
|
|
||||||
inputCleaning()
|
;;inputCleaning()
|
||||||
{
|
;;{
|
||||||
;;if (GetKeyState("RShift", "P") != 0) {
|
;; ;;if (GetKeyState("RShift", "P") != 0) {
|
||||||
;; SendInput, {RShift Down}
|
;; ;; SendInput, {RShift Down}
|
||||||
;;}
|
;; ;;}
|
||||||
if (GetKeyState("RCtrl", "P") != 0) {
|
;; if (GetKeyState("RCtrl", "P") != 0) {
|
||||||
SendInput, {RCtrl Down}
|
;; SendInput, {RCtrl Down}
|
||||||
}
|
;; }
|
||||||
return
|
;; return
|
||||||
}
|
;;}
|
||||||
|
|
||||||
;;2 is default speed
|
;;2 is default speed
|
||||||
RCtrl & Left::lefMov := -1
|
RCtrl & Left::lefMov := -1
|
||||||
RCtrl & Left Up::lefMov := 0
|
RCtrl & Left Up::lefMov := 0
|
||||||
|
|
@ -41,12 +39,138 @@ RCtrl & Down Up::downMov := 0
|
||||||
|
|
||||||
;;Toggle speed
|
;;Toggle speed
|
||||||
RCtrl & ,::
|
RCtrl & ,::
|
||||||
SendInput, {RCtrl Up}
|
;;SendInput, {RCtrl Up}
|
||||||
speedUp := !(speedUp)
|
speedUp := !(speedUp)
|
||||||
mouseSpeed := speedUp * speedUpFactor + 3
|
mouseSpeed := speedUp * speedUpFactor + 3
|
||||||
SendInput, {RCtrl Down}
|
;;SendInput, {RCtrl Down}
|
||||||
return
|
return
|
||||||
|
|
||||||
|
;;tuckaway
|
||||||
|
;;targeting 1080p displays with taskbar on top. Change at your leisure.
|
||||||
|
RCtrl & .::
|
||||||
|
MouseMove, 1940, 100
|
||||||
|
;;inputCleaning()
|
||||||
|
return
|
||||||
|
|
||||||
|
;;Toggle mouse movement
|
||||||
|
~RCtrl::
|
||||||
|
;;Global mouseSpeed, lBtnHold, mBtnHold, rBtnHold
|
||||||
|
;;Sleep, 10
|
||||||
|
mouseActive := 1
|
||||||
|
while (mouseActive != 0) {
|
||||||
|
if (GetKeyState("RCtrl", "P") = 0) {
|
||||||
|
mouseActive := 0
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
MouseMove, (rightMov + lefMov) * (mouseSpeed), (upMov + downMov) * (mouseSpeed), 0, R
|
||||||
|
if(GetKeyState("RShift", "P") = 1)
|
||||||
|
{
|
||||||
|
if(lBtnHold = 1)
|
||||||
|
{
|
||||||
|
SendInput, {LButton Up}
|
||||||
|
lBtnHold := 0
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SendInput, {LButton}
|
||||||
|
}
|
||||||
|
KeyWait, RShift
|
||||||
|
}
|
||||||
|
if(GetKeyState("Enter", "P") = 1)
|
||||||
|
{
|
||||||
|
if(mBtnHold = 1)
|
||||||
|
{
|
||||||
|
SendInput, {MButton Up}
|
||||||
|
mBtnHold := 0
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SendInput, {MButton}
|
||||||
|
}
|
||||||
|
KeyWait, Enter
|
||||||
|
}
|
||||||
|
if(GetKeyState("End", "P") = 1)
|
||||||
|
{
|
||||||
|
if(rBtnHold = 1)
|
||||||
|
{
|
||||||
|
SendInput, {RButton Up}
|
||||||
|
rBtnHold := 0
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SendInput, {RButton}
|
||||||
|
}
|
||||||
|
KeyWait, End
|
||||||
|
}
|
||||||
|
|
||||||
|
if(GetKeyState("/", "P") = 1)
|
||||||
|
{
|
||||||
|
if(lBtnHold = 1)
|
||||||
|
{
|
||||||
|
SendInput, {LButton Up}
|
||||||
|
lBtnHold := 0
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SendInput, {LButton Down}
|
||||||
|
lBtnHold := 1
|
||||||
|
}
|
||||||
|
KeyWait, /
|
||||||
|
}
|
||||||
|
if(GetKeyState("'", "P") = 1)
|
||||||
|
{
|
||||||
|
if(mBtnHold = 1)
|
||||||
|
{
|
||||||
|
SendInput, {MButton Up}
|
||||||
|
mBtnHold := 0
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SendInput, {MButton Down}
|
||||||
|
mBtnHold := 1
|
||||||
|
}
|
||||||
|
KeyWait, '
|
||||||
|
}
|
||||||
|
if(GetKeyState("PgDn", "P") = 1)
|
||||||
|
{
|
||||||
|
if(rBtnHold = 1)
|
||||||
|
{
|
||||||
|
SendInput, {RButton Up}
|
||||||
|
rBtnHold := 0
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SendInput, {RButton Down}
|
||||||
|
rBtnHold := 1
|
||||||
|
}
|
||||||
|
KeyWait, PgDn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
;;mouseActive := 0
|
||||||
|
rightMov := 0
|
||||||
|
lefMov := 0
|
||||||
|
upMov := 0
|
||||||
|
downMov := 0
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;;;;Mouse buttons
|
;;;;Mouse buttons
|
||||||
;;RCtrl & RShift::
|
;;RCtrl & RShift::
|
||||||
|
|
@ -87,122 +211,6 @@ RCtrl & ,::
|
||||||
;; Critical, Off
|
;; Critical, Off
|
||||||
;; return
|
;; return
|
||||||
;;
|
;;
|
||||||
;;tuckaway
|
|
||||||
;;targeting 1080p displays with taskbar on top. Change at your leisure.
|
|
||||||
RCtrl & .::
|
|
||||||
MouseMove, 1940, 100
|
|
||||||
inputCleaning()
|
|
||||||
return
|
|
||||||
|
|
||||||
;;Toggle mouse movement
|
|
||||||
~RCtrl::
|
|
||||||
Global mouseActive, mouseSpeed, lBtnHold, mBtnHold, rBtnHold
|
|
||||||
mouseActive := 1
|
|
||||||
while (GetKeyState("RCtrl", "P") != 0) {
|
|
||||||
MouseMove, (rightMov + lefMov) * (mouseSpeed), (upMov + downMov) * (mouseSpeed), 0, R
|
|
||||||
if(GetKeyState("RShift", "P") = 1)
|
|
||||||
{
|
|
||||||
if(lBtnHold = 1)
|
|
||||||
{
|
|
||||||
SendInput, {RCtrl Up}
|
|
||||||
SendInput, {LButton Up}
|
|
||||||
SendInput, {RCtrl Down}
|
|
||||||
lBtnHold := 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, {LButton}
|
|
||||||
}
|
|
||||||
Sleep, 60
|
|
||||||
}
|
|
||||||
if(GetKeyState("Enter", "P") = 1)
|
|
||||||
{
|
|
||||||
if(mBtnHold = 1)
|
|
||||||
{
|
|
||||||
SendInput, {RCtrl Up}
|
|
||||||
SendInput, {MButton Up}
|
|
||||||
SendInput, {RCtrl Down}
|
|
||||||
mBtnHold := 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, {MButton}
|
|
||||||
}
|
|
||||||
Sleep, 60
|
|
||||||
}
|
|
||||||
if(GetKeyState("End", "P") = 1)
|
|
||||||
{
|
|
||||||
if(rBtnHold = 1)
|
|
||||||
{
|
|
||||||
SendInput, {RCtrl Up}
|
|
||||||
SendInput, {RButton Up}
|
|
||||||
SendInput, {RCtrl Down}
|
|
||||||
rBtnHold := 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, {RButton}
|
|
||||||
}
|
|
||||||
Sleep, 60
|
|
||||||
}
|
|
||||||
|
|
||||||
if(GetKeyState("/", "P") = 1)
|
|
||||||
{
|
|
||||||
if(lBtnHold = 1)
|
|
||||||
{
|
|
||||||
SendInput, {RCtrl Up}
|
|
||||||
SendInput, {LButton Up}
|
|
||||||
SendInput, {RCtrl Down}
|
|
||||||
lBtnHold := 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, {LButton Down}
|
|
||||||
lBtnHold := 1
|
|
||||||
}
|
|
||||||
Sleep, 60
|
|
||||||
}
|
|
||||||
if(GetKeyState("'", "P") = 1)
|
|
||||||
{
|
|
||||||
if(mBtnHold = 1)
|
|
||||||
{
|
|
||||||
SendInput, {RCtrl Up}
|
|
||||||
SendInput, {MButton Up}
|
|
||||||
SendInput, {RCtrl Down}
|
|
||||||
mBtnHold := 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, {MButton Down}
|
|
||||||
mBtnHold := 1
|
|
||||||
}
|
|
||||||
Sleep, 60
|
|
||||||
}
|
|
||||||
if(GetKeyState("PgDn", "P") = 1)
|
|
||||||
{
|
|
||||||
if(rBtnHold = 1)
|
|
||||||
{
|
|
||||||
SendInput, {RCtrl Up}
|
|
||||||
SendInput, {RButton Up}
|
|
||||||
SendInput, {RCtrl Down}
|
|
||||||
rBtnHold := 0
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SendInput, {RButton Down}
|
|
||||||
rBtnHold := 1
|
|
||||||
}
|
|
||||||
Sleep, 60
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mouseActive := 0
|
|
||||||
rightMov := 0
|
|
||||||
lefMov := 0
|
|
||||||
upMov := 0
|
|
||||||
downMov := 0
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;;~' & RShift::
|
;;~' & RShift::
|
||||||
|
|
|
||||||
2
runscript.bat
Normal file
2
runscript.bat
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
START /B "C:\Program Files\AutoHotkey\AutoHotkey.exe" "D:\Contenido\Capybara\Cositas\piusare\mausu.ahk"
|
||||||
|
START /B "C:\Program Files\AutoHotkey\AutoHotkey.exe" "D:\Contenido\Capybara\Cositas\piusare\piusareLite.ahk"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue