Deprecated scripts moved aside

This commit is contained in:
Hane 2023-07-02 16:13:21 +02:00
commit f24dddb381
3 changed files with 0 additions and 0 deletions

25
old/cmah.ahk Normal file
View file

@ -0,0 +1,25 @@
SendMode Input
s::
SoundBeep, 600, 500 ; sonido para saber cuando empieza y acaba el script. (frecuencia y duración del sonido)
Send, {Right Down} ; enviamos el 1
sleep, 30 ; esperar 15000
Send, {Right Up}
Send, {Left Down}
sleep, 30
Send, {Down Down}
sleep, 30
Send, {Left Up}
sleep, 30
Send, {Right Down}
sleep, 30
Send, {Down Up}
sleep, 30
Send, {Z Down}
sleep, 30
; Click, Left
Send, {Z Up}
Send, {Right Up}
;sleep, 30
return
SoundBeep, 300,300

243
old/mausu.ahk Normal file
View file

@ -0,0 +1,243 @@
#MaxThreadsPerHotkey 1
;;WINDOOOOOOOOOOOOOOOOOOOOOOOOOOOOOWS y ahk unaware del futuro de los escritorios
;;https://www.autohotkey.com/boards/viewtopic.php?t=97706
DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr")
rightMov := 0
lefMov := 0
upMov := 0
downMov := 0
rBtnHold := 0
mBtnHold := 0
lBtnHold := 0
speedUp := 1
speedUpFactor := 20
mouseSpeed := speedUp * speedUpFactor + 3
;;inputCleaning()
;;{
;; ;;if (GetKeyState("RShift", "P") != 0) {
;; ;; SendInput, {RShift Down}
;; ;;}
;; if (GetKeyState("RCtrl", "P") != 0) {
;; SendInput, {RCtrl Down}
;; }
;; return
;;}
;;2 is default speed
RCtrl & Left::lefMov := -1
RCtrl & Left Up::lefMov := 0
RCtrl & Right::rightMov := 1
RCtrl & Right Up::rightMov := 0
RCtrl & Up::upMov := -1
RCtrl & Up Up::upMov := 0
RCtrl & Down::downMov := 1
RCtrl & Down Up::downMov := 0
;;Toggle speed
RCtrl & ,::
;;SendInput, {RCtrl Up}
speedUp := !(speedUp)
mouseSpeed := speedUp * speedUpFactor + 3
;;SendInput, {RCtrl Down}
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
;;RCtrl & RShift::
;; Critical, On
;; ;;SendInput, {RCtrl Up}
;; ;;SendInput, {RShift Up}
;; SendInput, {LButton Down}
;; ;;SendInput, {RShift Down}
;; Sleep, 80
;; if (GetKeyState("RShift","P") = 0)
;; {
;;
;; SendInput, {LButton Up}
;; ;;SendInput, {RCtrl Up}
;; }
;; ;;inputCleaning()
;; Critical, Off
;; return
;;RCtrl & End::
;; Critical, On
;; SendInput, {RCtrl Up}
;; SendInput, {End Up}
;; SendInput, {RButton}
;; inputCleaning()
;; Critical, Off
;; return
;;RCtrl & Enter::
;; Critical, On
;; SendInput, {RCtrl Up}
;; SendInput, {Enter Up}
;; SendInput, {MButton Down}
;; ;;while(GetKeyState("RCtrl","P") = 1)
;; ;;{
;; ;; SendInput, {RCtrl Up}
;; ;;}
;; SendInput, {MButton Up}
;; inputCleaning()
;; Critical, Off
;; return
;;
;;
;;~' & RShift::
;; SendInput, {' Up}
;; SendInput, {RShift Up}
;; SendInput, {LButton Down}
;; while(GetKeyState("'","P") != 0 && GetKeyState("RShift","P") != 0)
;; {
;;
;; }
;; SendInput, {LButton Up}
;; inputCleaning()
;; return
;;~' & End::
;; SendInput, {RCtrl Up}
;; SendInput, {End Up}
;; RButton}
;; inputCleaning()
;; return
;;~' & Enter::
;; SendInput, {' Up}
;; SendInput, {Enter Up}
;; SendInput, {MButton Down}
;; while(GetKeyState("'","P") != 0 && GetKeyState("Enter","P") != 0)
;; {
;;
;; }
;; SendInput, {MButton Up}
;; inputCleaning()
;; return

523
old/piusareLED.ahk Normal file
View file

@ -0,0 +1,523 @@
#SingleInstance
scrLkLed := 0
numLkLed := 0
capLkLed := 0
KeyboardLED(LEDvalue, Cmd, Kbd=0)
{
global scrLkLed, numLkLed, capLkLed
SetUnicodeStr(fn,"\Device\KeyBoardClass" Kbd)
h_device:=NtCreateFile(fn,0+0x00000100+0x00000080+0x00100000,1,1,0x00000040+0x00000020,0)
If Cmd= switch ;switches every LED according to LEDvalue
{
scrLkToggle:=(1<<0)
numlkToggle:=(1<<1)
capLkToggle:=(1<<2)
newState:=0
;curState:= (GetKeyState("ScrollLock", "T")) + 2*(GetKeyState("NumLock", "T")) + 4*(GetKeyState("CapsLock", "T"))
if (LEDvalue & scrLkToggle) {
newState += !(scrLkLed)
scrLkLed := !(scrLkLed)
;MsgBox % newState . " scr " . scrLkLed
}
else newState += (scrLkLed)
if (LEDvalue & numLkToggle)
newState += 2*(!(GetKeyState("NumLock", "T")))
else newState += 2*((GetKeyState("NumLock", "T")))
if (LEDvalue & capLkToggle)
newState += 4*(!(GetKeyState("CapsLock", "T")))
else newState += 4*((GetKeyState("CapsLock", "T")))
;MsgBox % newState
KeyLED:=newState
}
If Cmd= on ;forces all choosen LED's to ON (LEDvalue= 0 ->LED's according to keystate)
KeyLED:= LEDvalue | (GetKeyState("ScrollLock", "T") + 2*GetKeyState("NumLock", "T") + 4*GetKeyState("CapsLock", "T"))
If Cmd= off ;forces all choosen LED's to OFF (LEDvalue= 0 ->LED's according to keystate)
{
LEDvalue:= LEDvalue ^ 7
KeyLED:= LEDvalue & (GetKeyState("ScrollLock", "T") + 2*GetKeyState("NumLock", "T") + 4*GetKeyState("CapsLock", "T"))
}
success := DllCall( "DeviceIoControl"
, "ptr", h_device
, "uint", CTL_CODE( 0x0000000b ; FILE_DEVICE_KEYBOARD
, 2
, 0 ; METHOD_BUFFERED
, 0 ) ; FILE_ANY_ACCESS
, "int*", KeyLED << 16
, "uint", 4
, "ptr", 0
, "uint", 0
, "ptr*", output_actual
, "ptr", 0 )
NtCloseFile(h_device)
return success
}
CTL_CODE( p_device_type, p_function, p_method, p_access )
{
Return, ( p_device_type << 16 ) | ( p_access << 14 ) | ( p_function << 2 ) | p_method
}
NtCreateFile(ByRef wfilename,desiredaccess,sharemode,createdist,flags,fattribs)
{
VarSetCapacity(objattrib,6*A_PtrSize,0)
VarSetCapacity(io,2*A_PtrSize,0)
VarSetCapacity(pus,2*A_PtrSize)
DllCall("ntdll\RtlInitUnicodeString","ptr",&pus,"ptr",&wfilename)
NumPut(6*A_PtrSize,objattrib,0)
NumPut(&pus,objattrib,2*A_PtrSize)
status:=DllCall("ntdll\ZwCreateFile","ptr*",fh,"UInt",desiredaccess,"ptr",&objattrib
,"ptr",&io,"ptr",0,"UInt",fattribs,"UInt",sharemode,"UInt",createdist
,"UInt",flags,"ptr",0,"UInt",0, "UInt")
return % fh
}
NtCloseFile(handle)
{
return DllCall("ntdll\ZwClose","ptr",handle)
}
SetUnicodeStr(ByRef out, str_)
{
VarSetCapacity(out,2*StrPut(str_,"utf-16"))
StrPut(str_,&out,"utf-16")
}
caps_lock_state := false
test_fn := Func("KeyboardLED").bind(1, "switch", 0)
*CapsLock::
Global test_fn
caps_lock_state := !(caps_lock_state)
if (caps_lock_state) {
SetTimer, % test_fn, 200
KeyboardLED(1,"on",0)
} else {
SetTimer, % test_fn, Off
KeyboardLED(1,"off",0)
}
("CapsLock")
return
/*r::
MsgBox % "SI" . caps_lock_state . "e"
return
GUIA:
H,J,K,L-LEFT, DOWN, UP, RIGHT
P,O-PGUP, PGDN
I,U-ctrl+X, ctrl+C
Ñ-ctrl+V
M-F2
,-F8
N-ctrl+Z
Y-ctrl+Y
E-S
D-ESC
C-F && H WHEN CTRL+SHIFT
F-CTRL
S-SHIFT
8::KeyboardLED(1,"switch",0)
7::
MsgBox % "var " . scrLkLed
return
*/
LShift & RShift::CapsLock
RShift & LShift::CapsLock
;*CapsLock::return
#if caps_lock_state
f::return
X::return
s::return
a::return
h::
ctrlState := GetKeyState("F", "P")
shiftState := GetKeyState("s", "P")
altState := GetKeyState("a","P")
if ctrlState = 1
SendInput {Ctrl Down}
if shiftState = 1
SendInput {Shift Down}
if altState = 1
SendInput {Alt Down}
SendInput {Left}
if ctrlState = 1
SendInput {Ctrl Up}
if shiftState = 1
SendInput {Shift Up}
if altState = 1
SendInput {Alt Up}
return
j::
ctrlState := GetKeyState("F", "P")
shiftState := GetKeyState("s", "P")
altState := GetKeyState("a","P")
if ctrlState = 1
SendInput {Ctrl Down}
if shiftState = 1
SendInput {Shift Down}
if altState = 1
SendInput {Alt Down}
SendInput {Down}
if ctrlState = 1
SendInput {Ctrl Up}
if shiftState = 1
SendInput {Shift Up}
if altState = 1
SendInput {Alt Up}
return
l::
ctrlState := GetKeyState("F", "P")
shiftState := GetKeyState("s", "P")
altState := GetKeyState("a","P")
if ctrlState = 1
SendInput {Ctrl Down}
if shiftState = 1
SendInput {Shift Down}
if altState = 1
SendInput {Alt Down}
SendInput {Right}
if ctrlState = 1
SendInput {Ctrl Up}
if shiftState = 1
SendInput {Shift Up}
if altState = 1
SendInput {Alt Up}
return
k::
ctrlState := GetKeyState("F", "P")
shiftState := GetKeyState("s", "P")
altState := GetKeyState("a","P")
if ctrlState = 1
SendInput {Ctrl Down}
if shiftState = 1
SendInput {Shift Down}
if altState = 1
SendInput {Alt Down}
SendInput {Up}
if ctrlState = 1
SendInput {Ctrl Up}
if shiftState = 1
SendInput {Shift Up}
if altState = 1
SendInput {Alt Up}
return
m::
("m")
loop {
ctrlState := GetKeyState("f", "P")
shiftState := GetKeyState("s", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {F2}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{F2}") : ("^{F2}"))
return
case 2:
SendInput ^+{F2}
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
p::
("p")
loop {
ctrlState := GetKeyState("f", "P")
shiftState := GetKeyState("s", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {PgDn}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{PgDn}") : ("^{PgDn}"))
return
case 2:
SendInput ^+{PgDn}
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
return
o::
("o")
loop {
ctrlState := GetKeyState("f", "P")
shiftState := GetKeyState("s", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {PgUp}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{PgUp}") : ("^{PgUp}"))
return
case 2:
SendInput ^+{PgDn}
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
return
sc027::
("sc027")
SendInput ^{v}
return
i::
("i")
SendInput ^{x}
return
u::
("u")
SendInput ^{c}
return
N::
("N")
SendInput ^{z}
return
Y::
("Y")
SendInput ^{y}
return
sc033::
("sc033")
loop {
ctrlState := GetKeyState("f", "P")
shiftState := GetKeyState("s", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {F8}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{F8}") : ("^{F8}"))
return
case 2:
SendInput ^+{F8}
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
return
C::
("C")
loop {
ctrlState := GetKeyState("f", "P")
shiftState := GetKeyState("s", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput ^{f}
return
case 1:
SendInput, % ((shiftState == 1) ? ("^{F}") : ("^{H}"))
return
case 2:
;SendInput % ("^+{keyboardActions[""c""]}")
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
return
E::
("E")
shiftState := GetKeyState("s", "P")
SendInput, % ((shiftState == 1) ? ("^{S}") : ("^{s}"))
return
D::
("D")
SendInput {Esc}
return
sc01A::
("sc01A")
loop {
ctrlState := GetKeyState("f", "P")
shiftState := GetKeyState("s", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {Del}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{Del}") : ("^{Del}"))
return
case 2:
;SendInput % ("^+{keyboardActions[""c""]}")
SendInput ^+{Del}
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
return
sc01B::
("sc01B")
loop {
ctrlState := GetKeyState("f", "P")
shiftState := GetKeyState("s", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {Home}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{Home}") : ("^{Home}"))
return
case 2:
;SendInput % ("^+{keyboardActions[""c""]}")
SendInput ^+{Home}
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
return
sc02B::
("sc02B")
loop {
ctrlState := GetKeyState("f", "P")
shiftState := GetKeyState("s", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {End}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{End}") : ("^{End}"))
return
case 2:
;SendInput % ("^+{keyboardActions[""c""]}")
SendInput ^+{End}
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
return
sc028::
("sc028")
loop {
ctrlState := GetKeyState("f", "P")
shiftState := GetKeyState("s", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {Ins}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{Ins}") : ("^{Ins}"))
return
case 2:
;SendInput % ("^+{keyboardActions[""c""]}")
SendInput ^+{Ins}
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
return
Backspace::
("Backspace")
loop {
ctrlState := GetKeyState("f", "P")
shiftState := GetKeyState("s", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {Backspace}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{Backspace}") : ("^{Backspace}"))
return
case 2:
;SendInput % ("^+{keyboardActions[""c""]}")
SendInput ^+{Backspace}
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
return
#if