Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Networking guy needs HELP.How to call an executable with a delay in JS

Status
Not open for further replies.

yotafan

Technical User
Oct 29, 2004
7
0
0
US
Basically, i know how to call an executable, but i need to delay it from starting for 3 seconds.

When the code is ran it opens up a popup on the users machine which prompts them to hit Yes or No. I was able to use an other piece of software that will automatically answer yes when it opens, but when i try to call it in the javascript with the HREF= comman it starts before the popup. Is there a way to delay the start of the executable until the popup opens.

I am using AutoIT to automatically hit yes.

 
Use the settimeout function:

Code:
function confirmBox() {
     confirm("Click OK!");
}
setTimeout('confirmBox()', 3000)

That waits for 3 seconds to perform the "confirmBox" function

________________________________________
Give a man a match, he'll be warm for a minute. But light him on fire, and he'll be warm for the rest of his life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top