Creating a simple morse code translator for a school project and can’t figure out to analyze input text (input as words) into characters, and then do a set of if-then statements to change the characters to morse code (i.e. if input is A then .- is output). I’ve created my morse code library database but need help with workflows. I would be willing to read/watch tutorials if this is really easy. Thank you for any help you can provide!
Hey Austin, If you’re looking to replace individual characters within a word, I’m pretty sure the “:find and replace” option using a regex pattern could do this. As a really simple example, if you used the :findandreplace option without a regex patten, it could be:
That would find all of the As within a text value, and replace them with “.-”. Perhaps someone knows of a regex pattern that could identify and replace each individual character, with the morse code entries in your database.
There is a REST API available for translating text to morse.
You could probably use that!
The free plan has a restriction of 60 Calls per day, spread at 5/hour…maybe enough to get you going. If it is for educational purposes, i’m sure if your dropped them an email, they might be able to increase on your key for the duration of your project.
If you search Google, there are others, I’m sure you will be able to find a free one somewhere.
This topic was automatically closed after 70 days. New replies are no longer allowed.