Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_InteractInteraction

Public Function ShellWithWait (
CommandString As String,
FlagFileDir As String,
TimeoutSecs As Integer,
Optional FlagTimeout As Boolean = True,
Optional AddlWaitMilliSec As Long = 0
) As String

As the shell command is asynchronous, put the command in a batch file and generate a flag file at completion so we can wait for it. Assumes hourglass is set prior to function entry.

CommandString as String

The program to run

FlagFileDir as String

The folder in which to create the flag file

TimeoutSecs as Integer

Stop waiting for return after TimeoutSecs seconds

Optional FlagTimeout as Boolean = True

Print a message if the shell times out (default=True)

Optional AddlWaitMilliSec as Long = 0

Wait an additional number of milliseconds after the shell completes before returning. (to allow completeion and cleanup of the shell task)

Call Template:

Dim s As String
s = xf.Interact.ShellWithWait(CommandString, FlagFileDir, TimeoutSecs)
s = xf.Interact.ShellWithWait(CommandString, FlagFileDir, TimeoutSecs, FlagTimeout, AddlWaitMilliSec)

See Also:

Example 1:

ShellWithWait "C:\Program Files\SysInternals\du.exe", "", 1200
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd