Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / simulating a computer

Author
Message
Martend
14
Years of Service
User Offline
Joined: 23rd Jul 2010
Location:
Posted: 24th Jul 2010 15:01
Hi All,

I would like to learn how to simulate a computer,
who is showing text to someone in front of it.
Like you see in the beginning of the matrix movie.

So i want to load a background image (computer) and put lines of text on it, line by line, character by character, like someone is typing.
I dont want several lines of text like this...

contacting mainframe...
clientside loading...
uploading data ...

but i want them displayed one after one and if possible ask user for his name in between and then continue with showing lines of text.

How would i set-up something like this?
using strings and than delete them? or print text with ink like

ink rgbvalue
print "starting mainframe"
ink rgbvalue
print " "
ink rgbvalue
print "loading clientside"

I did look at some tuts etc, looked in a few books, tried some code
but i just get stucked, could someone point me in the right direction?
Thanks in advance!
M
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 25th Jul 2010 00:22
Hi, is this what you are looking for?


This program splits the string up into individual characters and stores them in an array. Then it prints each character one at a time.

A clever person solves a problem, a wise person avoids it - Albert Einstein
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 25th Jul 2010 13:01
Try search with "type writer" there is one thread in Code Snippets and few other.More results if you search like : "typewriter"

I tried some of this once and it works for me just the way you describe.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!
Martend
14
Years of Service
User Offline
Joined: 23rd Jul 2010
Location:
Posted: 25th Jul 2010 16:52
Awesome! thank you Hodgey and luskos, this wil help me.
Myself started with this:


As you can see your solutions can fit in.
Only problem i have is that WITHOUT a background image, it works fine, the spaces used in string$2 "delete" the text.
But WITH a background it prints line over line, so the "delete" characters trick with the spaces doesnt work.
Is there a way to delete the typed text and replace it with a new line, leaving the background image in place?
I tried using sync on and use the sync command after each typed phrase, I could not find a command like delete text.
thanks in advance!
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 25th Jul 2010 19:25 Edited at: 25th Jul 2010 19:27
Every time you want to erase the text you just need to PASTE the background. You can also put every line in an array and make it easier to work with using a FOR/NEXT loop.



Martend
14
Years of Service
User Offline
Joined: 23rd Jul 2010
Location:
Posted: 26th Jul 2010 20:16
Sweet!
This really helps me out a lot and points me in the right direction.
Back to the learning curve!
thanks again!

M

Login to post a reply

Server time is: 2024-11-24 13:35:21
Your offset time is: 2024-11-24 13:35:21