The Daily Click ::. Forums ::. Klik Coding Help ::. Creating a Teleprompter?
 

Post Reply  Post Oekaki 
 

Posted By Message

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
21st December, 2011 at 23:17:30 -

I'm introducing a set of tutorial videos and it'd really help if aside from my webcam recording software, I had an on-screen teleprompter. I know opening notepad and reading the text would work, but I want something a little more intuitive. I've looked into reviews on software like Adobe Communicator, but most of the reviews say it makes webcam footage look like complete trash.

Anyway, I'm in MMF2. I created a list object, a slider control, an edit box, and two buttons.
I'm using GetLine, TimeX, and String Parser.
TimeX works with my slider control to increase or decrease the amount of time before passing text from the edit box to the list object. It works.

What I need to figure out is some way to cut off the text in the edit box to format it into a list where each line is less than 18 characters, preferably cut at the end of words and after punctuation. I could just save the text and have the GetLine extension load it and shoot each line one-at-a-time to the list object.

Anybody mind helping me out here? I'm at a loss.

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
21st December, 2011 at 23:47:23 -

I *kinda* got it working.

It still won't break lines after words, so it's a little tough to read.
I ditched the string parser and getline extensions.
I ditched the idea of saving to a text file and reading line by line.
I added a second counter.

Now TimeX tells the list object to add a new line every X seconds (which is determined by the slider).
The line is added to the list object by using Mid$(Edittext$( "Edit Box" ), value( "Counter" ), 21).
Then I add 21 to the counter.

It'd still be really nice if somebody could help me break lines between words, though. I wouldn't exactly consider this a working teleprompter until I figure that part out.

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
22nd December, 2011 at 00:41:40 -

This should do the trick for the line-breaking part:
https://skydrive.live.com/redir.aspx?cid=b1e7ee094271bbda&resid=B1E7EE094271BBDA!432&parid=B1E7EE094271BBDA!131&authkey=!

 
n/a

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
22nd December, 2011 at 05:35:27 -

That's really clever! Thanks.
I'm getting some really wild behavior off of it, though.
I tried creating the necessary events from scratch the way they make sense in my app, but it's giving me the same effect as when I clone your global values and strings, copy/paste your events, and dump them into a separate list object. I figured if only I could get that working, I could just pull lines from the new list object into the teleprompter list object. No luck.

Instead, the list object only displays every third, fourth, or fifth word.
Any found "EndLineChars" result in a blank line, the list object skips a few more words, and displays another seemingly random excerpt.

My mind is completely blown because I can't for the life of me figure out what makes your example work and mine not work. I understand the event scripting and all I can seem to come up with is that either SubStringA and SubStringB aren't combining or one isn't carrying a string.

Image
Success, right? I've tried to make sense of which words get ignored and which words get picked and parsed, but I don't see any pattern that tells me what to change specifically. Ugh...

I know you're not going to appreciate seeing your events copied and pasted into my project, but once I understand why this is happening, I'll change the events or give you credit.

I've uploaded the file in case you want to take a look. I don't expect you to do the work for me and reupload, but if you want to let me in on a forehead-slap moment, I'd be appreciative.
https://skydrive.live.com/embed?cid=70BBDF17C90BF8FB&resid=70BBDF17C90BF8FB%21107&authkey=AP0wBVnDHXSnnx8

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
22nd December, 2011 at 12:14:58 -

You probably will slap your forehead...
The problem is just that you altered the order of actions in two of the events.
The two actions "Add line "SubStringB" to List" need to go at the top - you have them at the bottom, so by the time they're executed, SubStringB has already been changed to something else.

https://skydrive.live.com/redir.aspx?cid=b1e7ee094271bbda&resid=B1E7EE094271BBDA!433&parid=B1E7EE094271BBDA!131&authkey=!

I don't mind you copying the events (no need to give credit) - I wouldn't have bothered making the example if I didn't think there was a chance you might use it.
Merry Christmas

 
n/a

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
22nd December, 2011 at 21:43:06 -

*Slaps forehead*
That figures. Thanks a ton. I changed the events in my original and added a few formatting features.

Merry Christmas, dude.

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
   

Post Reply



 



Advertisement

Worth A Click