From aa0db150ee8bf5ffeef20d57e327835369f64991 Mon Sep 17 00:00:00 2001 From: OugonNoHane Date: Mon, 24 Oct 2022 15:22:10 +0200 Subject: [PATCH 1/2] intentar parametrizar ya volvere o no --- exetoso.ahk | 133 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 81 insertions(+), 52 deletions(-) diff --git a/exetoso.ahk b/exetoso.ahk index d55a0f6..bdb9f84 100644 --- a/exetoso.ahk +++ b/exetoso.ahk @@ -1,63 +1,90 @@ -CapsLock & j:: - shiftState := GetKeyState("Shift", "P") - ctrlState := GetKeyState("Ctrl", "P") - switch (shiftState + ctrlState) { - case 0: - SendInput {Left} - return - case 1: - SendInput, % ((shiftState == 1) ? ("+{Left}") : ("^{Left}")) - return - case 2: - SendInput ^+{Left} - return - default: - MsgBox % "menudo gilipolls" - return - } - return +; UP LEFT DOWN RIGHT +keyboardActions := {"i" : "Up", "j" : "Left", "k" : "Down" , "l" : "Right"} +;keyboardKeys := ["i", "j", "k", "l"] +;actions := ["Up", "Left", "Down", "Right"] +;parseKey(keyboardKey) { +; for key, value in keyboardActions +; if (value == keyboardKey) +; return value +; return 0 +;} +/* + +CapsLock & i:: +CapsLock & j:: +CapsLock & k:: +CapsLock & l:: + + MsgBox % "menudo gilipolls" +*/ + + +CapsLock & j:: + loop { + ctrlState := GetKeyState("Ctrl", "P") + shiftState := GetKeyState("Shift", "P") + switch (shiftState + ctrlState) { + case 0: + SendInput {Left} + return + case 1: + SendInput, % ((shiftState == 1) ? ("+{Left}") : ("^{Left}")) + return + case 2: + SendInput % ("^+{keyboardActions[""j""]}") + return + default: + MsgBox % "menudo gilipolls" + return + } + return + } CapsLock & k:: - shiftState := GetKeyState("Shift", "P") - ctrlState := GetKeyState("Ctrl", "P") - switch (shiftState + ctrlState) { - case 0: - SendInput {Down} - return - case 1: - SendInput, % ((shiftState == 1) ? ("+{Down}") : ("^{Down}")) - return - case 2: - SendInput ^+{Down} - return - default: - MsgBox % "menudo gilipolls" - return + loop { + shiftState := GetKeyState("Shift", "P") + ctrlState := GetKeyState("Ctrl", "P") + switch (shiftState + ctrlState) { + case 0: + SendInput {Down} + return + case 1: + SendInput, % ((shiftState == 1) ? ("+{Down}") : ("^{Down}")) + return + case 2: + SendInput ^+{Down} + return + default: + MsgBox % "menudo gilipolls" + return + } + return } - return - + CapsLock & l:: - shiftState := GetKeyState("Shift", "P") - ctrlState := GetKeyState("Ctrl", "P") - switch (shiftState + ctrlState) { - case 0: - SendInput {Right} - return - case 1: - SendInput, % ((shiftState == 1) ? ("+{Right}") : ("^{Right}")) - return - case 2: - SendInput ^+{Right} - return - default: - MsgBox % "menudo gilipolls" - return + loop { + ctrlState := GetKeyState("Ctrl", "P") + shiftState := GetKeyState("Shift", "P") + switch (shiftState + ctrlState) { + case 0: + SendInput {Right} + return + case 1: + SendInput, % ((shiftState == 1) ? ("+{Right}") : ("^{Right}")) + return + case 2: + SendInput ^+{Right} + return + default: + MsgBox % "menudo gilipolls" + return + } + return } - return - CapsLock & i:: + loop { shiftState := GetKeyState("Shift", "P") ctrlState := GetKeyState("Ctrl", "P") switch (shiftState + ctrlState) { @@ -75,6 +102,7 @@ CapsLock & i:: return } return + } /* myVarWithKeystrokes := "+john+doe{Tab}+pas+sw0rd{Enter}" @@ -94,4 +122,5 @@ case 1: } */ +Esc::ExitApp Esc::ExitApp \ No newline at end of file From c4ef6885b633aaf14fa2a3deb2f0e92a30cb4101 Mon Sep 17 00:00:00 2001 From: OugonNoHane Date: Mon, 24 Oct 2022 15:25:47 +0200 Subject: [PATCH 2/2] proto merge --- README.md | 8 ++------ exetoso.ahk | 12 ++++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 20366b6..8291889 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ -Merece la pena todo esto? +Prototipo con AHK: flechas en letras. -Puede que no, mas tampoco OW2 - -e igualmente se hizo. - - - Gato gamer \ No newline at end of file +Utilizar o compilar con AHKv1. diff --git a/exetoso.ahk b/exetoso.ahk index bdb9f84..8293c3e 100644 --- a/exetoso.ahk +++ b/exetoso.ahk @@ -16,7 +16,7 @@ CapsLock & j:: CapsLock & k:: CapsLock & l:: - MsgBox % "menudo gilipolls" + MsgBox % "testt" */ @@ -35,7 +35,7 @@ CapsLock & j:: SendInput % ("^+{keyboardActions[""j""]}") return default: - MsgBox % "menudo gilipolls" + MsgBox % "Fail!" return } return @@ -56,7 +56,7 @@ CapsLock & k:: SendInput ^+{Down} return default: - MsgBox % "menudo gilipolls" + MsgBox % "Fail!" return } return @@ -77,7 +77,7 @@ CapsLock & l:: SendInput ^+{Right} return default: - MsgBox % "menudo gilipolls" + MsgBox % "Fail!" return } return @@ -98,7 +98,7 @@ CapsLock & i:: SendInput ^+{Up} return default: - MsgBox % "menudo gilipolls" + MsgBox % "Fail!" return } return @@ -123,4 +123,4 @@ case 1: */ Esc::ExitApp -Esc::ExitApp \ No newline at end of file +/*Esc::ExitApp*/ \ No newline at end of file