calling two functions sequentially in vbscript with single click event
Posted
by sushant
on Stack Overflow
See other posts from Stack Overflow
or by sushant
Published on 2010-03-24T09:38:43Z
Indexed on
2010/03/24
9:43 UTC
Read the original article
Hit count: 202
vbscript
i need to call two function on a single click event. and also the functions shud get executed sequentially. i tried click me . but its not working.its not calling any of the functions. here is the complete code. sorry for formatting.
function copy() Dim WshShell, oExec,g,h h="D:\d" g="xcopy " & h & " " & "D:\y\ /E" Set WshShell = CreateObject("WScript.Shell") Set oExec = WshShell.Exec(g) Do While oExec.Status = 0 WScript.Sleep 100 Loop WScript.Echo oExec.Status end function function zip() Dim WshShel, oExe Set WshShel = CreateObject("WScript.Shell") Set oExe = WshShel.Exec("cmd /c cd D:\d & D: & winzip32.exe -min -a D:\a") Do While oExe.Status = 0 WScript.Sleep 100 Loop WScript.Echo oExe.Status end functionclick me
any help is appreciated.
© Stack Overflow or respective owner