Page 1 of 1

Advanced Text Module possible?

Posted: Tue Mar 21, 2006 3:27 am
by deckard97
Hi,

Question for GarageCube team:

I want to know if, with the help of a module I could try to write, it would be possible to do this:

A text module that would read text from a file, line by line.

Say I have a .txt file, I choose it through the module and I have "next" and "previous" buttons in the module (MIDI configurable, of course) and each time I would press "next" it would load the next line of text. and display it in the same "text container" I created.

So I could start from the existing Text module and would only need a way to "feed" text to it, from a file.

The application for this is to supply subtitles and be able to position them anywhere on the screen and rotate/scale them.

Thanks for the help.

Posted: Tue Mar 21, 2006 9:30 am
by bratch
well if you make it, make sure to get us informed; this can be a very usefull module ! :P

Posted: Tue Mar 21, 2006 10:28 am
by yves@garagecube
Yes this is possible and not too difficult to do. I don't have time to write myself now (with the V2.5) but I can help you.

1) you should use Python functions to read the file as a string and split it by lines into an array.

2) Then iterate through the array using the Next/Previous button

3) Send the string to the corresponding Modul8 keyword.

Let me know if you need help.

Yves.

Posted: Tue Mar 21, 2006 2:57 pm
by moonbase
That is just a great idea!!
I've been avoiding thinking about learning Python because there just isn't enough time in the day, now that may have to change.

Keep us informed please deckard97. There are loads of times when this would have been a great tool to have.
There is little I can practically help with at the moment except idea bouncing.

I guess I'm going to have to invent time travel just so's I can learn Python - damn.
:)

Posted: Tue Mar 24, 2009 1:08 am
by bright!
even though this thread is very old ... did anybody acomplish to write something like that?

i would love to have something like that.

Posted: Tue Mar 24, 2009 2:47 am
by deckard97
Nope.