-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Milan Mikula
committed
Jun 4, 2019
1 parent
dd8e344
commit c935e92
Showing
8 changed files
with
551 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
#InstallKeybdHook | ||
pressed=1 | ||
!q::exitApp | ||
;w::MsgBox %pressed% | ||
|
||
x::send ' | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
!a:: | ||
if (A_PriorHotKey = "~Alt" AND A_TimeSincePriorHotkey < 1000) | ||
{ | ||
if(pressed = "1"){ | ||
send à | ||
} | ||
|
||
if(pressed = "2"){ | ||
send â | ||
} | ||
if(pressed = "3"){ | ||
send æ | ||
} | ||
|
||
|
||
} | ||
else | ||
{ | ||
pressed=1 | ||
} | ||
return | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
!c::send ç | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
!e:: | ||
if (A_PriorHotKey = "~Alt" AND A_TimeSincePriorHotkey < 1000) | ||
{ | ||
if(pressed = "1"){ | ||
send è | ||
} | ||
if(pressed = "2"){ | ||
send ê | ||
} | ||
if(pressed = "3"){ | ||
send ë | ||
} | ||
|
||
|
||
} | ||
else | ||
{ | ||
pressed=1 | ||
} | ||
return | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
!i:: | ||
if (A_PriorHotKey = "~Alt" AND A_TimeSincePriorHotkey < 1000) | ||
{ | ||
if(pressed = "1"){ | ||
send î | ||
} | ||
if(pressed = "2"){ | ||
send ï | ||
} | ||
|
||
|
||
|
||
} | ||
else | ||
{ | ||
pressed=1 | ||
} | ||
return | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
!o::send œ | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
!u:: | ||
if (A_PriorHotKey = "~Alt" AND A_TimeSincePriorHotkey < 1000) | ||
{ | ||
if(pressed = "1"){ | ||
send ù | ||
} | ||
if(pressed = "2"){ | ||
send û | ||
} | ||
if(pressed = "3"){ | ||
send ü | ||
} | ||
|
||
|
||
|
||
} | ||
else | ||
{ | ||
pressed=1 | ||
} | ||
return | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
!y::send ÿ | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
~Alt:: | ||
;400 is the maximum allowed delay (in milliseconds) between presses. | ||
if (A_PriorHotKey = "~Alt" AND A_TimeSincePriorHotkey < 400) | ||
{ | ||
pressed := pressed + 1 | ||
|
||
} | ||
else | ||
{ | ||
pressed=1 | ||
} | ||
Sleep 0 | ||
KeyWait Alt | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
morse = 0 | ||
translate = 0 | ||
#m:: | ||
if morse = 0 | ||
{ | ||
morse = 1 | ||
Hotkey, a, on | ||
Hotkey, b, on | ||
Hotkey, c, on | ||
Hotkey, d, on | ||
Hotkey, e, on | ||
Hotkey, f, on | ||
Hotkey, g, on | ||
Hotkey, h, on | ||
Hotkey, i, on | ||
Hotkey, j, on | ||
Hotkey, k, on | ||
Hotkey, l, on | ||
Hotkey, m, on | ||
Hotkey, n, on | ||
Hotkey, o, on | ||
Hotkey, p, on | ||
Hotkey, q, on | ||
Hotkey, r, on | ||
Hotkey, s, on | ||
Hotkey, t, on | ||
Hotkey, u, on | ||
Hotkey, v, on | ||
Hotkey, w, on | ||
Hotkey, x, on | ||
Hotkey, y, on | ||
Hotkey, z, on | ||
|
||
} | ||
else | ||
{ | ||
morse = 0 | ||
Hotkey, a, off | ||
Hotkey, b, off | ||
Hotkey, c, off | ||
Hotkey, d, off | ||
Hotkey, e, off | ||
Hotkey, f, off | ||
Hotkey, g, off | ||
Hotkey, h, off | ||
Hotkey, i, off | ||
Hotkey, j, off | ||
Hotkey, k, off | ||
Hotkey, l, off | ||
Hotkey, m, off | ||
Hotkey, n, off | ||
Hotkey, o, off | ||
Hotkey, p, off | ||
Hotkey, q, off | ||
Hotkey, r, off | ||
Hotkey, s, off | ||
Hotkey, t, off | ||
Hotkey, u, off | ||
Hotkey, v, off | ||
Hotkey, w, off | ||
Hotkey, x, off | ||
Hotkey, y, off | ||
Hotkey, z, off | ||
|
||
} | ||
return | ||
^m:: MsgBox morse = %morse% | ||
|
||
a::send .-{Space} | ||
b::send -...{Space} | ||
c::send -.-.{Space} | ||
d::send -..{Space} | ||
e::send .{Space} | ||
f::send ..-.{Space} | ||
g::send --.{Space} | ||
h::send ....{Space} | ||
i::send ..{Space} | ||
j::send .---{Space} | ||
k::send -.-{Space} | ||
l::send .-..{Space} | ||
m::send --{Space} | ||
n::send -.{Space} | ||
o::send ---{Space} | ||
p::send .--.{Space} | ||
q::send --.-{Space} | ||
r::send .-.{Space} | ||
s::send ...{Space} | ||
t::send -{Space} | ||
u::send ..-{Space} | ||
v::send ...-{Space} | ||
w::send .--{Space} | ||
x::send -..-{Space} | ||
y::send -.--{Space} | ||
z::send --..{Space} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
a1 :="a" | ||
a2 :="b" | ||
a3 :="c" | ||
a4 :="d" | ||
a5 :="e" | ||
a6 :="f" | ||
a7 :="g" | ||
a8 :="h" | ||
a9 :="i" | ||
a10 :="j" | ||
a11 :="k" | ||
a12 :="l" | ||
a13 :="m" | ||
a14 :="n" | ||
a15 :="o" | ||
a16 :="p" | ||
a17 :="q" | ||
a18 :="r" | ||
a19 :="s" | ||
a20 :="t" | ||
a21 :="u" | ||
a22 :="v" | ||
a23 :="w" | ||
a24 :="x" | ||
a25 :="y" | ||
a26 :="z" | ||
|
||
m1 :=".-" | ||
m2 :="-..." | ||
m3 :="-.-." | ||
m4 :="-.." | ||
m5 :="." | ||
m6 :="..-." | ||
m7 :="--." | ||
m8 :="...." | ||
m9 :=".." | ||
m10 :=".---" | ||
m11 :="-.-" | ||
m12 :=".-.." | ||
m13 :="--" | ||
m14 :="-." | ||
m15 :="---" | ||
m16 :=".--." | ||
m17 :="--.-" | ||
m18 :=".-." | ||
m19 :="..." | ||
m20 :="-" | ||
m21 :="..-" | ||
m22 :="...-" | ||
m23 :="-.." | ||
m24 :="-..-" | ||
m25 :="-.--" | ||
m26 :="--.." | ||
array_len := 26 | ||
|
||
translate = 0 | ||
dir = 0 ;0 - morse to text; 1 - text to morse | ||
;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
||
ch_text2morse(char){ | ||
mor:=char | ||
global array_len | ||
Loop %array_len% | ||
{ | ||
a:=a%A_Index% | ||
m:=m%A_Index% | ||
if(a = char){ | ||
mor:=m | ||
} | ||
|
||
|
||
} | ||
if (char = " "){ | ||
return A_space | ||
} | ||
|
||
return mor | ||
|
||
} | ||
|
||
text2morse(text){ | ||
|
||
|
||
text_len:=strlen(text) | ||
morse:="" | ||
|
||
loop %text_len%{ | ||
char:=subStr(text,A_Index,1) | ||
morse_char:=ch_text2morse(char) | ||
if (morse_char = " "){ | ||
morse := morse . A_space | ||
} | ||
else | ||
{ | ||
morse := morse . morse_char . A_space | ||
} | ||
} | ||
|
||
return morse | ||
} | ||
|
||
form(text){ | ||
gui, font, s17, Verdana | ||
Gui, Add, Text,, %text% | ||
gui, font, s10, Verdana | ||
Gui, Add, Button, default, Zrus | ||
Gui, Add, Button, default, Clip | ||
Gui, Show,, Preklad | ||
|
||
} | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
||
|
||
#f:: | ||
x:="a" | ||
y:="a" | ||
if(x = y) | ||
{ | ||
msgbox array_len = %array_len% | ||
} | ||
|
||
return | ||
|
||
#a:: | ||
Loop %array_len% | ||
{ | ||
a:=a%A_Index% | ||
m:=m%A_Index% | ||
send %a% | ||
send {space}={space} | ||
send %m% | ||
send {enter} | ||
} | ||
return | ||
|
||
|
||
|
||
#t:: | ||
if translate = 0 | ||
{ | ||
translate = 1 | ||
} | ||
else | ||
{ | ||
translate = 0 | ||
} | ||
return | ||
|
||
|
||
|
||
MButton:: | ||
prev_clip = %clipboard% | ||
send ^c | ||
text = %clipboard% | ||
clipboard = %prev_clip% | ||
translated:=text2morse(text) | ||
form(translated) | ||
|
||
return | ||
|
||
|
||
|
||
GuiClose: | ||
ButtonZrus: | ||
Gui, Destroy | ||
|
||
ButtonClip: | ||
clipboard=%translated% | ||
Gui, Destroy | ||
;return | ||
|
Oops, something went wrong.