ShareShortcuts

Morse Code Converter

Usage: - Converts between Morse code and texts without internet

arirafiq
„Morse Code Converter“ forken

Hast du auf Basis dieses Kurzbefehls etwas Neues erstellt? Teile ihn als Fork: Er wird zu deinem eigenen Kurzbefehl, den du selbst verwaltest, und beide Seiten verlinken aufeinander, damit arirafiq die Anerkennung erhält.

  1. 1Lade den Kurzbefehl und ändere ihn in der Kurzbefehle-App. Gib ihm einen eigenen Namen.
  2. 2Teile ihn in der Kurzbefehle-App und kopiere den iCloud-Link.
  3. 3Komm hierher zurück, füge den Link ein und beschreibe, was sich geändert hat, z. B. „Einen Schritt hinzugefügt, der Apple Intelligence nutzt, um den Text zu personalisieren.“
Downloads
54K
Gesichert
1
Aktionen
41
Kategorie
Utilities
Version
1.1
Sprache
EN

Vorschau

Usage: - Converts between Morse code and texts without internet. - You can copy the result to your clipboard.

Neue Funktionen

Version 1.1

Link fixed.

Versionsverlauf
1.1 24. Mär 2021

Link fixed.

1.0 16. Jan 2021

First release

Was er macht

41 Aktionen
  1. Comment
    Author: Ari R. Abdulla Usage: - Converts between Morse code and texts without internet. - You can copy the result to your clipboard.
  2. Choose from Menu
    Which converter do you want?
  3. Choose from Menu
    Text to Morse Code
  4. Text
  5. Get Dictionary from Input
  6. Set Variable
    dict
  7. Ask for Input
    Enter your text?
  8. Get Text from Input
  9. Change Case
  10. Split Text
  11. Set Variable
    In
  12. Repeat with Each
  13. If
  14. Get Dictionary Value
  15. Combine Text
  16. Set Variable
    Result
  17. Choose from Menu
    Your Morse Code: …
  18. Choose from Menu
    Copy
  19. Copy to Clipboard
  20. Choose from Menu
    Exit
  21. Stop This Shortcut
  22. Choose from Menu
    Morse Code to Text
  23. Text
  24. Get Dictionary from Input
  25. Set Variable
    dictt
  26. Ask for Input
    Enter your morse code?
  27. Get Text from Input
  28. Split Text
  29. Set Variable
    Inn
  30. Repeat with Each
  31. If
  32. Get Dictionary Value
  33. Combine Text
  34. Change Case
  35. Set Variable
    Final
  36. Set Variable
    Resultt
  37. Choose from Menu
    Your Text: …
  38. Choose from Menu
    Copy
  39. Copy to Clipboard
  40. Choose from Menu
    Exit
  41. Stop This Shortcut

Als Code ansehen
Beta

Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.

#include 'actions/text'
#define color yellow

/*
Author: Ari R. Abdulla
Usage:
- Converts between Morse code and texts without internet.
- You can copy the result to your clipboard.
*/

menu "Which converter do you want?" {
item "Text to Morse Code":
	const Text = "{\n  \\"0\\": \\"-----\\",\n  \\"1\\": \\".----\\",\n  \\"2\\": \\"..---\\",\n  \\"3\\": \\"...--\\",\n  \\"4\\": \\"....-\\",\n  \\"5\\": \\".....\\",\n  \\"6\\": \\"-....\\",\n  \\"7\\": \\"--...\\",\n  \\"8\\": \\"---..\\",\n  \\"9\\": \\"----.\\",\n  \\"a\\": \\".-\\",\n  \\"b\\": \\"-...\\",\n  \\"c\\": \\"-.-.\\",\n  \\"d\\": \\"-..\\",\n  \\"e\\": \\".\\",\n  \\"f\\": \\"..-.\\",\n  \\"g\\": \\"--.\\",\n  \\"h\\": \\"....\\",\n  \\"i\\": \\"..\\",\n  \\"j\\": \\".---\\",\n  \\"k\\": \\"-.-\\",\n  \\"l\\": \\".-..\\",\n  \\"m\\": \\"--\\",\n  \\"n\\": \\"-.\\",\n  \\"o\\": \\"---\\",\n  \\"p\\": \\".--.\\",\n  \\"q\\": \\"--.-\\",\n  \\"r\\": \\".-.\\",\n  \\"s\\": \\"...\\",\n  \\"t\\": \\"-\\",\n  \\"u\\": \\"..-\\",\n  \\"v\\": \\"...-\\",\n  \\"w\\": \\".--\\",\n  \\"x\\": \\"-..-\\",\n  \\"y\\": \\"-.--\\",\n  \\"z\\": \\"--..\\",\n  \\".\\": \\".-.-.-\\",\n  \\",\\": \\"--..--\\",\n  \\"?\\": \\"..--..\\",\n  \\"!\\": \\"-.-.--\\",\n  \\"-\\": \\"-....-\\",\n  \\"/\\": \\"-..-.\\",\n  \\"@\\": \\".--.-.\\",\n  \\"(\\": \\"-.--.\\",\n  \\")\\": \\"-.--.-\\",\n  \\" \\": \\"/\\"\n}"
	getDictionary(Text)
	@dict
	const ProvidedInput = prompt("Enter your text?")
	const Text1 = getText(ProvidedInput)
	const UpdatedText = uppercase(Text1)
	splitText(UpdatedText, "")
	@In
	for _ in @In {
		if @RepeatItem == "" {
		}
	}
	joinText(RepeatResults, " ")
	@Result
	menu "Your Morse Code: {@Result} " {
	item "Copy":
		setClipboard(@Result)
	item "Exit":
		stop()
	}
item "Morse Code to Text":
	const Text2 = "{\n  \\"-----\\": \\"0\\",\n  \\".----\\": \\"1\\",\n  \\"..---\\": \\"2\\",\n  \\"...--\\": \\"3\\",\n  \\"....-\\": \\"4\\",\n  \\".....\\": \\"5\\",\n  \\"-....\\": \\"6\\",\n  \\"--...\\": \\"7\\",\n  \\"---..\\": \\"8\\",\n  \\"----.\\": \\"9\\",\n  \\".-\\": \\"a\\",\n  \\"-...\\": \\"b\\",\n  \\"-.-.\\": \\"c\\",\n  \\"-..\\": \\"d\\",\n  \\".\\": \\"e\\",\n  \\"..-.\\": \\"f\\",\n  \\"--.\\": \\"g\\",\n  \\"....\\": \\"h\\",\n  \\"..\\": \\"i\\",\n  \\".---\\": \\"j\\",\n  \\"-.-\\": \\"k\\",\n  \\".-..\\": \\"l\\",\n  \\"--\\": \\"m\\",\n  \\"-.\\": \\"n\\",\n  \\"---\\": \\"o\\",\n  \\".--.\\": \\"p\\",\n  \\"--.-\\": \\"q\\",\n  \\".-.\\": \\"r\\",\n  \\"...\\": \\"s\\",\n  \\"-\\": \\"t\\",\n  \\"..-\\": \\"u\\",\n  \\"...-\\": \\"v\\",\n  \\".--\\": \\"w\\",\n  \\"-..-\\": \\"x\\",\n  \\"-.--\\": \\"y\\",\n  \\"--..\\": \\"z\\",\n  \\".-.-.-\\": \\".\\",\n  \\"--..--\\": \\",\\",\n  \\"..--..\\": \\"?\\",\n  \\"-.-.--\\": \\"!\\",\n  \\"-....-\\": \\"-\\",\n  \\"-..-.\\": \\"/\\",\n  \\".--.-.\\": \\"@\\",\n  \\"-.--.\\": \\"(\\",\n  \\"-.--.-\\": \\")\\",\n  \\" \\": \\"\\",\n  \\"/\\": \\" \\"\n}"
	getDictionary(Text2)
	@dictt
	const ProvidedInput1 = prompt("Enter your morse code?")
	const Text3 = getText(ProvidedInput1)
	splitText(Text3, " ")
	@Inn
	for _ in @Inn {
		if @RepeatItem ==  {
		}
	}
	const CombinedText = joinText(RepeatResults1, "Custom")
	uppercase(CombinedText)
	@Final
	@Resultt = @Final
	menu "Your Text: {@Resultt}" {
	item "Copy":
		setClipboard(@Resultt)
	item "Exit":
		stop()
	}
}
In Cherri Playground öffnen Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.

Bewertungen und Rezensionen

Rezension schreiben
–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Werbung

Mehr von arirafiq

Alle anzeigen

Das gefällt dir vielleicht auch

Alle anzeigen
Werbung