vbscript - Cannot use parentheses when calling a Sub Error 800A0414 VBS -
i getting 800a0414 error in lines 7 , 12 of script:
module module1 dim p sub main() createobject("wscript.shell").run("program.bat", 0, true) p = process.getprocessesbyname("program") if p.count > 0 wscript.sleep(300000) else createobject("wscript.shell").run("program clean up.bat", 0, true) end if end sub private function wscript() object throw new notimplementedexception end function end module i trying run batch script, starts process, wait until process terminates, run batch script. not want command boxes beingness shown. if easier way please allow me know.
thanks help
when enclose procedure's argument list in parentheses, must utilize call keyword:
call createobject("wscript.shell").run("program.bat", 0, true) if omit call keyword, must drop parentheses:
createobject("wscript.shell").run "program.bat", 0, true vbscript
No comments:
Post a Comment