Hi Everyone, i wanted to know how i can have a script write some pre defined strings of text over a 40 second period with ocational pre defined second pauses.

I would really appreciate everyones help with this as it is quite important. thank you :)

The end result would be something like:


--------------------------------------------------------------------------------------------

(All of the following would be written by the script)

(The following would be written in a 5 second period with a 1 second pause after the first and second lines)

Searching For Webpage Configuration files...
...
Found 10 configuration files.

Loading Flies...

(The following would all be written in around 10 seconds, with the pauses being after the "Loading.." lines)


Loading confg...
Done..!
Loading fav...
Done..!
Loading sysinfo...
Done..!
Loading CCPVQ...
Done..!
Loading location...
Done..!
Loading history...
Done..!
Loading log...
Done..!
Loading fwconfig...
Done..!
Loading index...
Done..!
Loading ipconfig...
Done..!

File Loading Completed.

( Now the next 15 seconds would be spent writting the following. the status bars should take 4 seconds to finish each )

Checking Settings...
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Modifying Settings
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Applying Settings
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

(After that is done the remaining 10 seconds would be spent on the following, with the pauses before the "Done" lines)

Settings successfu applied !

Renewing IP Address...
Done..!

Activating Webpage...
Done..!

Settings Check Completed.

Press Home on the left hand menu to go to the webpage.

(Here it should stop and just wait for teh user to press the HOME button)
--------------------------------------------------------------------------------------------

Seems like you need to do this:

var strings = [
	'loading config',
	'done',
	'loading fav',
	'done'
];// define values to print in this array


function writeText(index) {
	var area = document.getElementById('area'); // textarea object where will be print each word step-by-step
	area.value += strings[index] + '\n';
	index++;
	if (index < strings.length) { // will stop when all words will be printed
		setTimeout('writeText('+index+')', 1000); // will print next word after 1 second
	}
}

And the use following HTML to test this:

<textarea id='area'></textarea><br/>
<input type="button" value="start" onclick="writeText(0);">
This article has been dead for over six months. Start a new discussion instead.