Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a := 139 ; 1 indicates a dot, 3 indicates a dash, 9 indicates the end of the character.
- b := 31119
- c := 31319
- d := 3119
- e := 19
- f := 11319
- g := 3319
- h := 11119
- i := 119
- j := 13339
- k := 3139
- l := 13119
- m := 339
- n := 319
- o := 3339
- p := 13319
- q := 33139
- r := 1319
- s := 1119
- t := 39
- u := 1139
- v := 11139
- w := 1339
- x := 31139
- y := 31339
- z := 33119
- dot := 180 ; This is the length of the base unit. Increasing the number increases the time it takes for a message to play.
- dash := dot * 3
- shpace := dot * 4 ; misspelled since space normally means something on its own
- F2:: ; takes message, converts to numbers which represent dots, dashes and spaces.
- InputBox, message
- message := RegExReplace(message, " ", 4)
- StringSplit, letter, message
- Loop, %letter0%
- {
- pseudo_array_element := letter%A_index%
- contents_of_pseudo_array_element := %pseudo_array_element%
- number_string = %number_string%%pseudo_array_element%
- }
- return
- f3:: ; uses previously created string of numbers, loops to create the appropriate flash length for each number as it goes through the string.
- StringSplit, dotdash, number_string
- loop, %dotdash0%
- {
- if dotdash%a_index% = 1
- {
- Gui, Show, w479 h379, dot
- Sleep, dot
- Gui Destroy
- Sleep, dot
- }
- if dotdash%a_index% = 3
- {
- Gui, Show, w479 h379, dash
- Sleep, dash
- Gui Destroy
- Sleep, dot
- }
- if dotdash%a_index% = 4
- {
- Sleep, shpace
- }
- if dotdash%a_index% = 9
- {
- Sleep, dash
- }
- }
- return
- {#IfWinActive, ahk_exe SciTE.exe
- ~^s::Reload
- #p::Pause
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement