windows - Making a messagebox with countdown and application launch batch script -
needing there delay application start. need write batch file displays popup message reads "pos load in %xx% seconds. please wait..."
i if %xx% countdown, if remains static, that's okay. once 20 seconds has passed, need batch script call application need , close.
any assistance appreciated.
one way:
@echo off @echo wscript.createobject("wscript.shell").popup "i dissapear in 5 seconds", 5 > %temp%\wait.vbs wscript %temp%\wait.vbs echo done
instead of .vbs make .hta
@echo off %temp%\wait.hta echo done
make file
<html> <head> <title>wait</title> <hta:application applicationname="pleasewait" id="pleasewait" version="1.00" sysmenu="no" maximizebutton="no" minimizebutton="no" scroll="no" /> </head> <script language="vbscript"> sub window_onload window.resizeto 300, 100 window.moveto (window.screen.width - 300) / 2, (window.screen.height - 100) / 2 end sub </script> <script language="javascript"> var count = 5, counter = setinterval(timer, 1000); function timer() { if ((count -= 1) <= 0) { clearinterval(counter); window.close(); } document.getelementbyid("secs").innerhtml = count; } </script> <body> <h2>wait <span id="secs"></span></h2> </body> </html>
Comments
Post a Comment