| Home | All functions | Categories |
vuRunExistsEx(*CSTRING pFile, LONG WaitSeconds, LONG PollMS), LONG
Attempts to run the specified file if it exists. Optionally waits for the file to appear, polling at the given interval, before running it.
| Parameter | Data Type | Description |
|---|---|---|
| pFile | CSTRING(260) | Full path to the file to execute if present. |
| WaitSeconds | LONG | Maximum number of seconds to wait for the file to appear. |
| PollMS | LONG | Interval, in milliseconds, to poll for the file while waiting. |
Note: In vuFileTools V5, CSTRINGs are not limited to the size shown above. The number is for example only.
A LONG value indicating the result:
FilePath CSTRING(260)
WaitSeconds LONG
PollMS LONG
Ret LONG
FilePath = 'C:\Temp\LaterFile.txt'
WaitSeconds = 10
PollMS = 200
Ret = vuRunExistsEx(FilePath, WaitSeconds, PollMS)
MESSAGE('vuRunExistsEx returned: ' & FORMAT(Ret), 'vuRunExistsEx Test')
Notes
Useful for scenarios where a file will be generated shortly and then executed.
Polling continues until the file appears or the wait time expires.
| Home | All functions | Categories |