Advanced Text Module possible?
  • deckard97
    member
    Posts: 33
    Joined: Thu Mar 09, 2006 5:11 am
    Location: Québec, Canada

    Advanced Text Module possible?

    by deckard97 » Tue Mar 21, 2006 3:27 am

    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.
  • bratch
    super8 member
    Posts: 135
    Joined: Thu Nov 17, 2005 8:03 pm
    Location: Qbc

    by bratch » Tue Mar 21, 2006 9:30 am

    well if you make it, make sure to get us informed; this can be a very usefull module ! :P
  • User avatar
    yves@garagecube
    master
    Posts: 695
    Joined: Mon Jun 28, 2004 5:50 pm
    Location: Geneva
    Contact:

    by yves@garagecube » Tue Mar 21, 2006 10:28 am

    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.
  • moonbase
    super8 member
    Posts: 147
    Joined: Mon Sep 20, 2004 12:12 am
    Location: Derbyshire, UK
    Contact:

    by moonbase » Tue Mar 21, 2006 2:57 pm

    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.
    :)
  • bright!
    junior Member
    Posts: 8
    Joined: Mon Oct 27, 2008 7:51 pm

    by bright! » Tue Mar 24, 2009 1:08 am

    even though this thread is very old ... did anybody acomplish to write something like that?

    i would love to have something like that.
  • deckard97
    member
    Posts: 33
    Joined: Thu Mar 09, 2006 5:11 am
    Location: Québec, Canada

    by deckard97 » Tue Mar 24, 2009 2:47 am

    Nope.

Who is online

Users browsing this forum: No registered users and 19 guests