From 970ed6b7f49c864a192bbc4a0302da6e58968ad5 Mon Sep 17 00:00:00 2001 From: adam6806 Date: Fri, 7 Sep 2018 01:33:16 -0400 Subject: [PATCH 1/3] Added modes to funky keys --- Unofficial/AHK/ahk-typing/funky-numbers.ahk | 49 ++++++++++++++------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/Unofficial/AHK/ahk-typing/funky-numbers.ahk b/Unofficial/AHK/ahk-typing/funky-numbers.ahk index 57e4591..9aba809 100644 --- a/Unofficial/AHK/ahk-typing/funky-numbers.ahk +++ b/Unofficial/AHK/ahk-typing/funky-numbers.ahk @@ -8,22 +8,28 @@ ; Will only run if Notepad is open, can be commented out to run on any program #IfWinActive, ahk_exe notepad.exe +; 1 is off, 2 is minus-one, 3 is random +global MODE := 1 + +;(Ctrl + WindowsKey + Alt + Numpad1) Off +;(Ctrl + WindowsKey + Alt + Numpad2) Minus-One +;(Ctrl + WindowsKey + Alt + Numpad3) Random +;(Ctrl + WindowsKey + Alt + NumpadSub) Exit -; Sends any number key pressed minus one #UseHook -; 1:: -; 2:: -; 3:: -; 4:: -; 5:: -; 6:: -; 7:: -; 8:: -; 9:: -; send % A_ThisHotkey - 1 -; return - -; Sends any random number key when any other number key is pressed + +!#^Numpad1:: ; Off + MODE := 1 +return + +!#^Numpad2:: ; Minus-One + MODE := 2 +return + +!#^Numpad3:: ; Random + MODE := 3 +return + 1:: 2:: 3:: @@ -34,6 +40,19 @@ 8:: 9:: 0:: +if (MODE == 2) { ; Sends any number key pressed minus one + if (A_ThisHotkey == 0) { + send 9 + } else { + send % A_ThisHotkey - 1 + } +} else if (MODE == 3) { ; Sends any random number key when any other number key is pressed Random, rand, 0, 9 send %rand% -return \ No newline at end of file +} else { + send % A_ThisHotkey +} +return + +;***** Hotkey to End script ***** +!#^NumpadSub::ExitApp \ No newline at end of file From e81bfc803ddcdcba09d0af96c926b642a40878bb Mon Sep 17 00:00:00 2001 From: adam6806 Date: Fri, 7 Sep 2018 03:38:58 -0400 Subject: [PATCH 2/3] Added fat finger mode --- Unofficial/AHK/ahk-typing/funky-numbers.ahk | 36 ++++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/Unofficial/AHK/ahk-typing/funky-numbers.ahk b/Unofficial/AHK/ahk-typing/funky-numbers.ahk index 9aba809..20be17c 100644 --- a/Unofficial/AHK/ahk-typing/funky-numbers.ahk +++ b/Unofficial/AHK/ahk-typing/funky-numbers.ahk @@ -1,5 +1,5 @@ ; Originally authored by Nameless#7323/sgtqwerty and shared on the official Kitboga Discord -; This script grants the ability to type numbers either one-off, or as random other numbers +; This script grants the ability to type numbers either one-off, random other numbers, or numbers close by at a random chance #SingleInstance force #Persistent @@ -11,10 +11,11 @@ ; 1 is off, 2 is minus-one, 3 is random global MODE := 1 -;(Ctrl + WindowsKey + Alt + Numpad1) Off -;(Ctrl + WindowsKey + Alt + Numpad2) Minus-One -;(Ctrl + WindowsKey + Alt + Numpad3) Random -;(Ctrl + WindowsKey + Alt + NumpadSub) Exit +;(Ctrl + WindowsKey + Alt + Numpad1) Off (Returns normal numbers) +;(Ctrl + WindowsKey + Alt + Numpad2) Minus-One (Returns the number minus 1) +;(Ctrl + WindowsKey + Alt + Numpad3) Random (Returns a random number) +;(Ctrl + WindowsKey + Alt + Numpad4) Fat Finger (Returns a random chance of the original number, or the number - 1, or the number + 1) +;(Ctrl + WindowsKey + Alt + NumpadSub) Exit (Shuts down the script) #UseHook @@ -30,6 +31,10 @@ return MODE := 3 return +!#^Numpad4:: ; Fat Finger + MODE := 4 +return + 1:: 2:: 3:: @@ -49,6 +54,27 @@ if (MODE == 2) { ; Sends any number key pressed minus one } else if (MODE == 3) { ; Sends any random number key when any other number key is pressed Random, rand, 0, 9 send %rand% +} else if (MODE == 4) { ; Sends either the original number, the number -1, or the number plus one. Weighted to send the original key more often + Random, rand, 1, 10 + if (rand < 2) { + if (A_ThisHotkey == 1) { + send 2 + } else if (A_ThisHotkey == 0) { + send 9 + } else { + send % A_ThisHotkey - 1 + } + } else if (rand < 10) { + send % A_ThisHotkey + } else { + if (A_ThisHotkey == 0) { + send 9 + } else if (A_ThisHotkey == 9) { + send 0 + } else { + send % A_ThisHotkey + 1 + } + } } else { send % A_ThisHotkey } From a7171c22ae6c30b662727ce354cae340fb5820f2 Mon Sep 17 00:00:00 2001 From: adam6806 Date: Fri, 7 Sep 2018 03:45:12 -0400 Subject: [PATCH 3/3] Added my contribution to the header --- Unofficial/AHK/ahk-typing/funky-numbers.ahk | 1 + 1 file changed, 1 insertion(+) diff --git a/Unofficial/AHK/ahk-typing/funky-numbers.ahk b/Unofficial/AHK/ahk-typing/funky-numbers.ahk index 20be17c..f32e9e5 100644 --- a/Unofficial/AHK/ahk-typing/funky-numbers.ahk +++ b/Unofficial/AHK/ahk-typing/funky-numbers.ahk @@ -1,4 +1,5 @@ ; Originally authored by Nameless#7323/sgtqwerty and shared on the official Kitboga Discord +; Mode select and fat fingers added by DangerBK ; This script grants the ability to type numbers either one-off, random other numbers, or numbers close by at a random chance #SingleInstance force