[ANSWERED] [LOGGED] Letter by Letter Read
-
@craigw said:
<p>@laurentr</p><p>Thanks, I'll give it a try.</p>
You can use 'text' with the Data Array actor. So when it outputs the text, you have a number of actors in Isadora that can do different things with text. However, by far the most flexible of these is the Javascript actor, you can do nearly anything you can imagine with text in Javascript.
Do you want the text draw to first write "H", then "He", then "Hel", then "Hell", then "Hello" ? Or do you want each letter in series?
The first option can be done in Javascript very easily... with only 1 output feeding to 1 Text Draw actor (this would scale to longer text more easily.)If you can provide a clear spec for what the text should do, I am sure you can get help with the Javascript here in the forum :)
-
For example, this JavaScript code allows you to split a string. Let's say we have "Hello world", this will give the following output.
1: H, 2: e, 3: l, 4: l, 5: o, 6: space, 7: w, 8: o, 9: r, 10: l, 11: dfunction main()
{
return Array.from(arguments[0]);
}But like DusX said, give us an example on what you wish so that we give you a hand ;)
-
Thanks so much for the help and offer to help.
I'll compile my short list.
I think it's time to sit down an learn JS.
Thanks
-
There's also the Text Chopper actor: https://recordit.co/OJ47qGiClS
(PS: You may find this User Actor helpful: Javascript String Length)
-
Hi, The "readtextfromfile" actor worked in 3.0.8 but I can't get it to work in 3.1.1.
Here's what I'm looking for:
My file is named words.txt 6 lines of 5 letter words. Someone will type in words live line by line, so I'll need to be about to update the file read as I go.
Next is the wish list:
If I make the file 7 lines instead of 6 and line 1 the top word is the secret word that we're trying to match,I would like a letter comparator to compare letters of lines 2-7 to be able to compare letters to line 1.
Sorry it's hard to explain a picture is so much easier.
-
@craigw said:
If I make the file 7 lines instead of 6 and line 1 the top word is the secret word that we're trying to match,I would like a letter comparator to compare letters of lines 2-7 to be able to compare letters to line 1.
How's this? text-comparison.izz
(Note: this just handles combining the letter from each line into a single word and then comparing that word to a pre-defined word. I didn't specifically implement what you needed in your file, you'll have to transition over whichever method you like best into your file.)
-
Thanks a lot, I'll try it.
-
@craigw said:
so I'll need to be about to update the file read as I go
As you know this can be done with Data Array, and for a simple list of words may be your easiest method of loading the data, although you can also use the Read() function in Javascript. (tutorial)
Once you have the text data, Javascript can handle comparing each letter and keeping a count or what ever you need..?
I'm still unclear what exactly you need, but it does sounds like something that is much easier to workout using Javascript. -
@craigw said:
Hi, The "readtextfromfile" actor worked in 3.0.8 but I can't get it to work in 3.1.1.
Strange cause it works with me on 3.1.1, I am actually working with it on a project right now... ( On Mojave )
-
Data array with the text chopper works great for me.
Sorry, One last question, I'm trying to type a file path using the "Edit Text" box. When I try to type a " ." period for the .txt it doesn't show it.
It'll read it though.
-
I did a quick test on PC, then on macOS Catalina.
Both have no issue displaying the '.' for me with the default font. (I increased the size)Did you perhaps change fonts to something unexpected?
-
Thanks, Looks like the "Show Value of Linked Properties" may have been the culprit.
-
@craigw said:
Looks like the "Show Value of Linked Properties" may have been the culprit.
How is that? Does the '.' not display for your when 'Show Value of Linked Properties' is selected?
-
@dusx said:
How is that? Does the '.' not display for your when 'Show Value of Linked Properties' is selected?
Yes, this reminded me that I'd seen this before. I searched the database for a report but there wasn't one, so I logged it as a new entry.
-
The issue with 'periods' being blocked from entry is due to File Path input fields having some error checking implemented, and the nature of the 'Show Value of Linked Properties' feature.
It is possible to enter the text indirectly via a trigger text actor (or other text actors).
We are looking into modifying this behavior for a future version.