Rich4rd

Morse Keyboard with Morse Sound

Oct 23rd, 2021
888
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Morse Keyboard with Morse Sound
  2. /*
  3. The frequency of the sound (can be an expression) should be a number between 37 and 32767. If omitted, the frequency will be 523.
  4. The duration of the sound, in milliseconds (can be an expression). If omitted, the duration will be 150.
  5. */
  6. SendMode Input
  7. ;CoordMode ToolTip
  8. ;CoordMode, A_CoordModeCaret
  9.  
  10. Home::
  11.   ToolTip % "Morse: "((mTog:=!mTog)?"On":"Off"),10,A_ScreenHeight-30
  12.   SetTimer tOff,-2000
  13. Return
  14.  
  15. #If mTog
  16. ~a::
  17. ToolTip, .-, A_CaretX-10, A_CaretY-20
  18. ;SoundBeep [, Frequency, Duration]
  19. SoundBeep, 1200
  20. SoundBeep, 1200, 500
  21. Sleep, 500
  22. ToolTip
  23. SendInput, {BS}.- `
  24. return
  25.  
  26. ~b::
  27. ToolTip, -..., A_CaretX-10, A_CaretY-20
  28. ;SoundBeep [, Frequency, Duration]
  29. SoundBeep, 1200, 500
  30. SoundBeep, 1200
  31. SoundBeep, 1200
  32. SoundBeep, 1200
  33. Sleep, 500
  34. ToolTip
  35. SendInput, {BS}-... `
  36. return    
  37.  
  38. ~c::
  39. ToolTip, -.-., A_CaretX-10, A_CaretY-20
  40. ;SoundBeep [, Frequency, Duration]
  41. SoundBeep, 1200, 500
  42. SoundBeep, 1200
  43. SoundBeep, 1200, 500
  44. SoundBeep, 1200
  45. Sleep, 500
  46. ToolTip
  47. SendInput, {BS}-.-. `
  48. return    
  49.  
  50. ~d::
  51. ToolTip, -.., A_CaretX-10, A_CaretY-20
  52. ;SoundBeep [, Frequency, Duration]
  53. SoundBeep, 1200, 500
  54. SoundBeep, 1200
  55. SoundBeep, 1200
  56. Sleep, 500
  57. ToolTip
  58. SendInput, {BS}-.. `
  59. return
  60.  
  61. ~e::
  62. ToolTip, ., A_CaretX-10, A_CaretY-20
  63. ;SoundBeep [, Frequency, Duration]
  64. SoundBeep, 1200
  65. Sleep, 500
  66. ToolTip
  67. SendInput, {BS}. `
  68. return
  69.  
  70. ~f::
  71. ToolTip, ..-., A_CaretX-10, A_CaretY-20
  72. ;SoundBeep [, Frequency, Duration]
  73. SoundBeep, 1200
  74. SoundBeep, 1200
  75. SoundBeep, 1200, 500
  76. SoundBeep, 1200
  77. Sleep, 500
  78. ToolTip
  79. SendInput, {BS}..-. `
  80. return
  81.  
  82. ~g::
  83. ToolTip, --., A_CaretX-10, A_CaretY-20
  84. ;SoundBeep [, Frequency, Duration]
  85. SoundBeep, 1200, 500
  86. SoundBeep, 1200, 500
  87. SoundBeep, 1200
  88. Sleep, 500
  89. ToolTip
  90. SendInput, {BS}--. `
  91. return    
  92.  
  93. ~h::
  94. ToolTip, ...., A_CaretX-10, A_CaretY-20
  95. ;SoundBeep [, Frequency, Duration]
  96. SoundBeep, 1200
  97. SoundBeep, 1200
  98. SoundBeep, 1200
  99. SoundBeep, 1200
  100. Sleep, 500
  101. ToolTip
  102. SendInput, {BS}.... `
  103. return
  104.  
  105. ~i::
  106. ToolTip, .., A_CaretX-10, A_CaretY-20
  107. ;SoundBeep [, Frequency, Duration]
  108. SoundBeep, 1200
  109. SoundBeep, 1200
  110. Sleep, 500
  111. ToolTip
  112. SendInput, {BS}.. `
  113. return
  114.  
  115. ~j::
  116. ToolTip, .---, A_CaretX-10, A_CaretY-20
  117. ;SoundBeep [, Frequency, Duration]
  118. SoundBeep, 1200
  119. SoundBeep, 1200, 500
  120. SoundBeep, 1200, 500
  121. SoundBeep, 1200, 500
  122. Sleep, 500
  123. ToolTip
  124. SendInput, {BS}.--- `
  125. return
  126.  
  127. ~k::
  128. ToolTip, -.-, A_CaretX-10, A_CaretY-20
  129. ;SoundBeep [, Frequency, Duration]
  130. SoundBeep, 1200, 500
  131. SoundBeep, 1200
  132. SoundBeep, 1200, 500
  133. Sleep, 500
  134. ToolTip
  135. SendInput, {BS}-.- `
  136. return
  137.  
  138. ~l::
  139. ToolTip, .-.., A_CaretX-10, A_CaretY-20
  140. ;SoundBeep [, Frequency, Duration]
  141. SoundBeep, 1200
  142. SoundBeep, 1200, 500
  143. SoundBeep, 1200
  144. SoundBeep, 1200
  145. Sleep, 500
  146. ToolTip
  147. SendInput, {BS}.-.. `
  148. return
  149.  
  150. ~m::
  151. ToolTip, --, A_CaretX-10, A_CaretY-20
  152. SoundBeep, 1200, 500
  153. SoundBeep, 1200, 500
  154. Sleep, 500
  155. ToolTip
  156. SendInput, {BS}-- `
  157. return
  158.  
  159. ~n::
  160. ToolTip, -., A_CaretX-10, A_CaretY-20
  161. SoundBeep, 1200, 500
  162. SoundBeep, 1200
  163. Sleep, 500
  164. ToolTip
  165. SendInput, {BS}-. `
  166. return
  167.  
  168. ~o::
  169. ToolTip, ---, A_CaretX-10, A_CaretY-20
  170. ;SoundBeep [, Frequency, Duration]
  171. SoundBeep, 1200, 500
  172. SoundBeep, 1200, 500
  173. SoundBeep, 1200, 500
  174. Sleep, 500
  175. ToolTip
  176. SendInput, {BS}--- `
  177. return
  178.  
  179. ~p::
  180. ToolTip, .--., A_CaretX-10, A_CaretY-20
  181. SoundBeep, 1200
  182. SoundBeep, 1200, 500
  183. SoundBeep, 1200, 500
  184. SoundBeep, 1200
  185. Sleep, 500
  186. ToolTip
  187. SendInput, {BS}.--. `
  188. return
  189.  
  190. ~q::
  191. ToolTip, --.-, A_CaretX-10, A_CaretY-20
  192. SoundBeep, 1200, 500
  193. SoundBeep, 1200, 500
  194. SoundBeep, 1200
  195. SoundBeep, 1200, 500
  196. Sleep, 500
  197. ToolTip
  198. SendInput, {BS}--.- `
  199. return
  200.  
  201. ~r::
  202. ToolTip, .-., A_CaretX-10, A_CaretY-20
  203. SoundBeep, 1200
  204. SoundBeep, 1200, 500
  205. SoundBeep, 1200
  206. Sleep, 500
  207. ToolTip
  208. SendInput, {BS}.-. `
  209. return
  210.  
  211. ~s::
  212. ToolTip, ..., A_CaretX-10, A_CaretY-20
  213. SoundBeep, 1200
  214. SoundBeep, 1200
  215. SoundBeep, 1200
  216. Sleep, 500
  217. ToolTip
  218. SendInput, {BS}... `
  219. return
  220.  
  221. ~t::
  222. ToolTip, -, A_CaretX-10, A_CaretY-20
  223. SoundBeep, 1200, 500
  224. Sleep, 500
  225. ToolTip
  226. SendInput, {BS}- `
  227. return
  228.  
  229. ~u::
  230. ToolTip, ..-, A_CaretX-10, A_CaretY-20
  231. SoundBeep, 1200
  232. SoundBeep, 1200
  233. SoundBeep, 1200, 500
  234. Sleep, 500
  235. ToolTip
  236. SendInput, {BS}..- `
  237. return
  238.  
  239. ~v::
  240. ToolTip, ...-, A_CaretX-10, A_CaretY-20
  241. SoundBeep, 1200
  242. SoundBeep, 1200
  243. SoundBeep, 1200
  244. SoundBeep, 1200, 500
  245. Sleep, 500
  246. ToolTip
  247. SendInput, {BS}...- `
  248. return
  249.  
  250. ~w::
  251. ToolTip, .--, A_CaretX-10, A_CaretY-20
  252. SoundBeep, 1200
  253. SoundBeep, 1200, 500
  254. SoundBeep, 1200, 500
  255. Sleep, 500
  256. ToolTip
  257. SendInput, {BS}.-- `
  258. return
  259.  
  260. ~x::
  261. ToolTip, -..-, A_CaretX-10, A_CaretY-20
  262. SoundBeep, 1200, 500
  263. SoundBeep, 1200
  264. SoundBeep, 1200
  265. SoundBeep, 1200, 500
  266. Sleep, 500
  267. ToolTip
  268. SendInput, {BS}-..- `
  269. return
  270.  
  271. ~y::
  272. ToolTip, -.--, A_CaretX-10, A_CaretY-20
  273. SoundBeep, 1200, 500
  274. SoundBeep, 1200
  275. SoundBeep, 1200, 500
  276. SoundBeep, 1200, 500
  277. Sleep, 500
  278. ToolTip
  279. SendInput, {BS}-.-- `
  280. return
  281.  
  282. ~z::
  283. ToolTip, --.., A_CaretX-10, A_CaretY-20
  284. SoundBeep, 1200, 500
  285. SoundBeep, 1200, 500
  286. SoundBeep, 1200
  287. SoundBeep, 1200
  288. Sleep, 500
  289. ToolTip
  290. SendInput, {BS}--.. `
  291. return
  292. ;-----------------------------------------------------------------------------------------
  293.  
  294. ~0::
  295. ToolTip, -----, A_CaretX-10, A_CaretY-20
  296. SoundBeep, 1200, 500
  297. SoundBeep, 1200, 500
  298. SoundBeep, 1200, 500
  299. SoundBeep, 1200, 500
  300. SoundBeep, 1200, 500
  301. Sleep, 500
  302. ToolTip
  303. SendInput, {BS}----- `
  304. return
  305.  
  306. ~1::
  307. ToolTip, .----, A_CaretX-10, A_CaretY-20
  308. SoundBeep, 1200
  309. SoundBeep, 1200, 500
  310. SoundBeep, 1200, 500
  311. SoundBeep, 1200, 500
  312. SoundBeep, 1200, 500
  313. Sleep, 500
  314. ToolTip
  315. SendInput, {BS}.---- `
  316. return
  317.  
  318. ~2::
  319. ToolTip, ..---, A_CaretX-10, A_CaretY-20
  320. SoundBeep, 1200
  321. SoundBeep, 1200
  322. SoundBeep, 1200, 500
  323. SoundBeep, 1200, 500
  324. SoundBeep, 1200, 500
  325. Sleep, 500
  326. ToolTip
  327. SendInput, {BS}..--- `
  328. return
  329.  
  330. ~3::
  331. ToolTip, ...--, A_CaretX-10, A_CaretY-20
  332. SoundBeep, 1200
  333. SoundBeep, 1200
  334. SoundBeep, 1200
  335. SoundBeep, 1200, 500
  336. SoundBeep, 1200, 500
  337. Sleep, 500
  338. ToolTip
  339. SendInput, {BS}...-- `
  340. return
  341.  
  342. ~4::
  343. ToolTip, ....-, A_CaretX-10, A_CaretY-20
  344. SoundBeep, 1200
  345. SoundBeep, 1200
  346. SoundBeep, 1200
  347. SoundBeep, 1200
  348. SoundBeep, 1200, 500
  349. Sleep, 500
  350. ToolTip
  351. SendInput, {BS}....- `
  352. return
  353.  
  354. ~5::
  355. ToolTip, ....., A_CaretX-10, A_CaretY-20
  356. SoundBeep, 1200
  357. SoundBeep, 1200
  358. SoundBeep, 1200
  359. SoundBeep, 1200
  360. SoundBeep, 1200
  361. Sleep, 500
  362. ToolTip
  363. SendInput, {BS}..... `
  364. return
  365.  
  366. ~6::
  367. ToolTip, -...., A_CaretX-10, A_CaretY-20
  368. SoundBeep, 1200, 500
  369. SoundBeep, 1200
  370. SoundBeep, 1200
  371. SoundBeep, 1200
  372. SoundBeep, 1200
  373. Sleep, 500
  374. ToolTip
  375. SendInput, {BS}-.... `
  376. return
  377.  
  378. ~7::
  379. ToolTip, --..., A_CaretX-10, A_CaretY-20
  380. SoundBeep, 1200, 500
  381. SoundBeep, 1200, 500
  382. SoundBeep, 1200
  383. SoundBeep, 1200
  384. SoundBeep, 1200
  385. Sleep, 500
  386. ToolTip
  387. SendInput, {BS}--... `
  388. return
  389.  
  390. ~8::
  391. ToolTip, ---.., A_CaretX-10, A_CaretY-20
  392. SoundBeep, 1200, 500
  393. SoundBeep, 1200, 500
  394. SoundBeep, 1200, 500
  395. SoundBeep, 1200
  396. SoundBeep, 1200
  397. Sleep, 500
  398. ToolTip
  399. SendInput, {BS}---.. `
  400. return
  401.  
  402. ~9::
  403. ToolTip, ----., A_CaretX-10, A_CaretY-20
  404. SoundBeep, 1200, 500
  405. SoundBeep, 1200, 500
  406. SoundBeep, 1200, 500
  407. SoundBeep, 1200, 500
  408. SoundBeep, 1200
  409. Sleep, 500
  410. ToolTip
  411. SendInput, {BS}----. `
  412. return
  413. ;-----------------------------------------------------------------------------------------
  414.  
  415. ~!:: ;Exclamation
  416. ToolTip, ---., A_CaretX-10, A_CaretY-20
  417. SoundBeep, 1200, 500
  418. SoundBeep, 1200, 500
  419. SoundBeep, 1200, 500
  420. SoundBeep, 1200
  421. Sleep, 500
  422. ToolTip
  423. SendInput, {BS}---. `
  424. return
  425.  
  426. ~.:: ;Period
  427. ToolTip, .-.-.-, A_CaretX-10, A_CaretY-20
  428. SoundBeep, 1200
  429. SoundBeep, 1200, 500
  430. SoundBeep, 1200
  431. SoundBeep, 1200, 500
  432. SoundBeep, 1200
  433. SoundBeep, 1200, 500
  434. Sleep, 500
  435. ToolTip
  436. SendInput, {BS}.-.-.- `
  437. return
  438.  
  439. ~,:: ;Comma
  440. ToolTip, --..--, A_CaretX-10, A_CaretY-20
  441. SoundBeep, 1200, 500
  442. SoundBeep, 1200, 500
  443. SoundBeep, 1200
  444. SoundBeep, 1200
  445. SoundBeep, 1200, 500
  446. SoundBeep, 1200, 500
  447. Sleep, 500
  448. ToolTip
  449. SendInput, {BS}--..-- `
  450. return
  451.  
  452. ~/:: ;Slash
  453. ToolTip, -..-., A_CaretX-10, A_CaretY-20
  454. SoundBeep, 1200, 500
  455. SoundBeep, 1200
  456. SoundBeep, 1200
  457. SoundBeep, 1200, 500
  458. SoundBeep, 1200
  459. Sleep, 500
  460. ToolTip
  461. SendInput, {BS}-..-. `
  462. return
  463.  
  464. ~\:: ;Backslash
  465. ToolTip, .-..-., A_CaretX-10, A_CaretY-20
  466. SoundBeep, 1200
  467. SoundBeep, 1200, 500
  468. SoundBeep, 1200
  469. SoundBeep, 1200
  470. SoundBeep, 1200, 500
  471. SoundBeep, 1200
  472. Sleep, 500
  473. ToolTip
  474. SendInput, {BS}.-..-. `
  475. return
  476. */
  477.  
  478. ~|:: ;
  479. ToolTip, -.--.-, A_CaretX-10, A_CaretY-20
  480. SoundBeep, 1200, 500
  481. SoundBeep, 1200
  482. SoundBeep, 1200, 500
  483. SoundBeep, 1200, 500
  484. SoundBeep, 1200
  485. SoundBeep, 1200, 500
  486. Sleep, 500
  487. ToolTip
  488. SendInput, {BS}-.--.- `
  489. return
  490.  
  491. ~?:: ;Question Mark
  492. ToolTip, ..--.., A_CaretX-10, A_CaretY-20
  493. SoundBeep, 1200
  494. SoundBeep, 1200
  495. SoundBeep, 1200, 500
  496. SoundBeep, 1200, 500
  497. SoundBeep, 1200
  498. SoundBeep, 1200
  499. Sleep, 500
  500. ToolTip
  501. SendInput, {BS}..--.. `
  502. return
  503.  
  504. :C*:: :: ;Colon ":"
  505. ToolTip, ---..., A_CaretX-10, A_CaretY-20
  506. SoundBeep, 1200, 500
  507. SoundBeep, 1200, 500
  508. SoundBeep, 1200, 500
  509. SoundBeep, 1200
  510. SoundBeep, 1200
  511. SoundBeep, 1200
  512. Sleep, 500
  513. ToolTip
  514. SendInput, ---...
  515. return
  516.  
  517. ~;:: ;Semicolon
  518. ToolTip, -.-.-, A_CaretX-10, A_CaretY-20
  519. SoundBeep, 1200, 500
  520. SoundBeep, 1200
  521. SoundBeep, 1200, 500
  522. SoundBeep, 1200
  523. SoundBeep, 1200, 500
  524. Sleep, 500
  525. ToolTip
  526. SendInput, {BS}-.-.- `
  527. return
  528.  
  529. ~':: ;Apostrophe
  530. ToolTip, .----., A_CaretX-10, A_CaretY-20
  531. SoundBeep, 1200
  532. SoundBeep, 1200, 500
  533. SoundBeep, 1200, 500
  534. SoundBeep, 1200, 500
  535. SoundBeep, 1200, 500
  536. SoundBeep, 1200
  537. Sleep, 500
  538. ToolTip
  539. SendInput, {BS}.----. `
  540. return
  541.  
  542. ~+:: ;Plus
  543. ToolTip, .-.-., A_CaretX-10, A_CaretY-20
  544. SoundBeep, 1200
  545. SoundBeep, 1200, 500
  546. SoundBeep, 1200
  547. SoundBeep, 1200, 500
  548. SoundBeep, 1200
  549. Sleep, 500
  550. ToolTip
  551. SendInput, {BS}.-.-. `
  552. return
  553.  
  554. ~-:: ;Dash
  555. ToolTip, -....-, A_CaretX-10, A_CaretY-20
  556. SoundBeep, 1200, 500
  557. SoundBeep, 1200
  558. SoundBeep, 1200
  559. SoundBeep, 1200
  560. SoundBeep, 1200
  561. SoundBeep, 1200, 500
  562. Sleep, 500
  563. ToolTip
  564. SendInput, {BS}-....- `
  565. return
  566.  
  567. ~_:: ;Underline
  568. ToolTip, ..--.-, A_CaretX-10, A_CaretY-20
  569. SoundBeep, 1200
  570. SoundBeep, 1200
  571. SoundBeep, 1200, 500
  572. SoundBeep, 1200, 500
  573. SoundBeep, 1200
  574. SoundBeep, 1200, 500
  575. Sleep, 500
  576. ToolTip
  577. SendInput, {BS}..--.- `
  578. return
  579.  
  580. ~(:: ;Opening Parentheses
  581. ~[:: ;Opening Parentheses
  582. ToolTip, -.--., A_CaretX-10, A_CaretY-20
  583. SoundBeep, 1200, 500
  584. SoundBeep, 1200
  585. SoundBeep, 1200, 500
  586. SoundBeep, 1200, 500
  587. SoundBeep, 1200
  588. Sleep, 500
  589. ToolTip
  590. SendInput, {BS}-.--. `
  591. return
  592.  
  593. ~):: ;Closing Parentheses
  594. ~]:: ;Closing Parentheses
  595. ToolTip, -.--.-, A_CaretX-10, A_CaretY-20
  596. SoundBeep, 1200, 500
  597. SoundBeep, 1200
  598. SoundBeep, 1200, 500
  599. SoundBeep, 1200, 500
  600. SoundBeep, 1200
  601. SoundBeep, 1200, 500
  602. Sleep, 500
  603. ToolTip
  604. SendInput, {BS}-.--.- `
  605. return
  606.  
  607. ~=:: ;
  608. ToolTip, -...-, A_CaretX-10, A_CaretY-20
  609. SoundBeep, 1200, 500
  610. SoundBeep, 1200
  611. SoundBeep, 1200
  612. SoundBeep, 1200
  613. SoundBeep, 1200, 500
  614. Sleep, 500
  615. ToolTip
  616. SendInput, {BS}-...- `
  617. return
  618.  
  619. ~@:: ;
  620. ToolTip, .--.-., A_CaretX-10, A_CaretY-20
  621. SoundBeep, 1200
  622. SoundBeep, 1200, 500
  623. SoundBeep, 1200, 500
  624. SoundBeep, 1200
  625. SoundBeep, 1200, 500
  626. SoundBeep, 1200
  627. Sleep, 500
  628. ToolTip
  629. SendInput, {BS}.--.-. `
  630. return
  631.  
  632. ~$:: ;
  633. ToolTip, ...-..-, A_CaretX-10, A_CaretY-20
  634. SoundBeep, 1200
  635. SoundBeep, 1200
  636. SoundBeep, 1200
  637. SoundBeep, 1200, 500
  638. SoundBeep, 1200
  639. SoundBeep, 1200
  640. SoundBeep, 1200, 500
  641. Sleep, 500
  642. ToolTip
  643. SendInput, {BS}...-..- `
  644. return
  645.  
  646. ~Space::SendInput, {BS}/{Space} ; / = Space
  647. return
  648.  
  649. #If
  650.  
  651. tOff:
  652.  ToolTip
  653. Return
RAW Paste Data