I did it once again, the “Impossible” (meaning people haven’t tried hard enough yet). It’s actually a really simple system that took me about an hour to figure out (could have been faster but I discovered a bug).
So what’s happening is that the text is getting Split so it can go into a List Each (The Text Case is just there to make it all uppercase if I wanted to complete the list I would add lowercase, numbers, etc to it). That then goes into a Text List “Find” input to see what letter it was. That then goes into an expression where I add 100 to make each word 3 numbers long (A = 101, Z = 126, this is the key to this system), that expression then gets added to a Text behavior to store those values. It then goes into a List Each (Would have done Text to Number but that created a bug) where it was then sent to the object that reads those values via a Message (Wow).
So when this gets the values it adds them to a Number List and all of it is then outputted from a timer set to 0 for a 1 frame delay. Once the list is outputted it goes into a List Each which outputs all the values into a Router set to “Always Increment” (It automatically gets 2 inputs so it starts at 1, unneeded but it looks better). When outputs 2 and 3 are activated they are added to a Text, and when output 1 is activated outputs those values into a To Number which goes into a filter (only needed because the repeater activates 1 at the start), that then goes into One input on a Text List, which then gets added to a Text. And when the List Each is done it puts the Text into a Label. (after each time 1 is activated it resets the stored values)
And then boom! You have an incredible CodeAlpaca trademarked system that turns Text into Numbers and back to Text!
If anyone sees any flaws please tell me so I can fix them (Besides having to send a lot of messages because I’m using a List Each in the Messaging object. I would have used a To Number and just converted it in the object getting the message but Flowlab doesn’t like long numbers I guess
I also discovered this bug so the system is not as clean as I would like.
It takes a single frame to do it and it gets everything correct, but idk if having a lot of messages sent to it at once could mess it up. I tested it with over 100 letters and it worked fine, it’s just that I want the code itself to be cleaner
so if you wanted to send the whole list as a single number, you would have to designate something to separate each index. For example, if you designate 9:
The receiver can set it as a text and then split on 9’s
The only problem is that there would be numbers that include 9 like 9,19,29,etc.
One solution I can think of is to just not have any letters on these indexes in the “alphabet” list. Basically create an empty space on every index that would have a 9. That way you will only have a 9 in the sending number to separate indexes.
It’s kind of a stupid work around but it’s the only way to combine a list into a single number that I know of.
I know how to do all that, the problem was when I was sending a large number of numbers over (30) it outputted 1.0311510410510112e+29, and for some reason, I can add that to a Number List/Number behavior and it doesn’t output the numbers but it literally outputs 1.0311510410510112e+29
@JR01 sorry to ping you, but just wondering if you notice any flaws with this system. It works fine when I tested it, but in case you know of any problems that can happen if there are multiple messages that are being sent that would be nice to know.
I’m using a List Each because flowlab doesn’t allow me to send a long string of numbers.
The code isn’t more complicated than it needs to be, it’s pretty simple (I had to work around a bug so it’s slightly bigger than I would like). I also only spent about an hour on it so there may be an extra behavior or 2, but not much.
Also, Samuel does this help with your problem?
(responding to multiple people in one post, accidentally clicked reply on your post JR, meant to just click the reply button)