morse.ahk
v0.1.0
Published
A simple Morse code library for AutoHotkey
Downloads
10
Readme
#morse
A simple Morse code library for AutoHotkey
Installation
In a terminal or command line:
npm install morse.ahk
In your code only export.ahk needs to be included:
#Include %A_ScriptDir%\node_modules
#Include morse.ahk\export.ahk
morse := new morse()
result := morse.decode("..-. --- --- ....... -... .- .-.")
; => "foo bar"
API
.encode(value)
Encodes and returns a given string or array
encoded := morse.encode("Hello, world.")
; => ".... . .-.. .-.. --- --..-- ....... .-- --- .-. .-.. -.. .-.-.-"
encoded := morse.encode(["hello", "world"])
; => [".... . .-.. .-.. ---", ".-- --- .-. .-.. -.."]
.decode(value)
Decodes and returns a string or array
morse.decode(".... . .-.. .-.. --- --..-- ....... .-- --- .-. .-.. -.. .-.-.-");
; => HELLO, WORLD.
morse.decode([".... . .-.. .-.. ---", ".-- --- .-. .-.. -.."]);
; => [ "HELLO", "WORLD" ]
attributes
morse.dict
An object containing morse: character
translations