![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Feb 2005
Posts: 62
Rep Power: 4
![]() |
[VB6] shell() timing issues
i have a small problem concerning timing the execution of a shell() command and the manipulation of its output.
here is a nutshell version of my code: (1) user inputs parameters (2) batch file is created based on parameters (the batch file, when run, creates a separate text file) (3) shell(batch file) (4) text file is opened and contents parsed based on the contents of that outputted text file, i have reason to believe that VB is flying through the commands and executing (4) before the shell (3) has finished doing everything it's supposed to do. is there any way to make VB wait for termination of the shell before continuing execution of the program? thanks |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Use the Sleep function. For example, the following code will cause the program to wait for one second, or one thousand milliseconds, before executing the next command.
Sleep 1000 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|