Jun 29, 2013 07:14 PM
(This post was last modified: Jun 29, 2013 07:16 PM by Johnny Cache.)
Hey!
I have my little project. i want a window to last 6 seconds, then it should run another script and close itself.
I am pretty new to JavaScript but i am willing to learn.
Here´s my code:
This is the HTML code i am using to execute the script:
In addition to the first thing i want to realize, i want to stop the VBScript from running onload. It just executes the Batch file at start, but i want it to start the Batch file after those 6 seconds of the first script.
I hope you can help me.
-L-
I have my little project. i want a window to last 6 seconds, then it should run another script and close itself.
I am pretty new to JavaScript but i am willing to learn.
Here´s my code:
Code
function timedOutStart(){
setTimeout(timedOutStart(), 6000);
document.getElementById("runfile")
window.close();
}Code
<script id="runfile" type="text/VBScript">
CreateObject("WScript.Shell").Run "test.bat"
</script>This is the HTML code i am using to execute the script:
Code
<body [b]onload=[/b]"timedOutStart()">In addition to the first thing i want to realize, i want to stop the VBScript from running onload. It just executes the Batch file at start, but i want it to start the Batch file after those 6 seconds of the first script.
I hope you can help me.
-L-

