In VB control code I call a file/script of a different programming language - free ware program called AutoIt. This file/script will open an application (i.e. Outlook) and test it. What is the code to wait until this script has finished so the VB control pannel can carry on with the next stage of the program? I don't think I can pass paramaters into and out of the script.
I was thinking of getting the Process Image Name (Task Manager) of the application that has run and wait until it has finished/process name does not exist anymore (once the application is closed the script is finished) - before continuing with the VB code, for the next test.
Please amend the following code to make this possible:
'Call AutoIt Outlook Test
'Need code to check if OUTLOOK.EXE exists (Outlook process image name).
'If so assign it to PIName variable
'If MS Outlook opened/OUTLOOK.EXE exists, wait until the test is over before proceeding.
'Please amend this code if necessary
If PIName = "OUTLOOK.EXE" Then
'While OUTLOOK.EXE/MS Outlook is still running
'Wait until MS Outlook is closed and it is finished testing
oErrLog.LogError Pre, eTests.Test3, "MS Outlook", "MS Outlook failed to open", Err.Number