We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello! This is my first attempt at using processing, so I'm sorry if my question is basic. I am using mouse tracking for two people to communicate secretly. In short, person A and B have the same text document, and A wants to send a message to B, so A uses processing to track the mouse's position over words one after the other to create the secret message, and those x,y positions per word are saved on a .txt. file, which is then sent to B. I already did this part, but struggling with part two: How to then read those x,y values from a .txt on processing, and showcase the position (with a dot or ellipse, whatever) on the screen every time B clicks on 'space' for example, to go from one word to another (to decrypt the message)?
I hope this is clear enough, and thanks in advance!
Answers
W/o posting your attempt, it's virtually impossible for us to give any help! [-(
Plus, we dunno how those pair coordinates are stored in your ".txt" file.
Is it compatible w/ ".csv", w/ those 2 coords. separated by commas. and each of them in separate lines?
Or are they separated by tabs or spaces? Are they all in the same line or some other exotic arrangement? :-??
If it's ".csv" or ".tsv", you can rely on Processing's data structure Table:
https://processing.org/reference/loadTable_.html
Otherwise, rely on loadStrings(), plus split() or splitTokens() in order to separate the values of each line:
Search this forum for examples about it. There are a lot of them! #:-S