Ticket #3162: exit1.au3

File exit1.au3, 430 bytes (added by PTim, 9 years ago)

Sample AutoIt test file to show the issue

Line 
1#pragma compile(Console, True)
2#include <Constants.au3>
3#include <MsgBoxConstants.au3>
4Local $Result
5Local $command
6
7$Result = 100
8MsgBox($MB_SYSTEMMODAL, "First Result", "Result: " & $Result)
9
10$Command = "mytest.bat"
11$Result = RunWait($Command)
12If @error Then
13    MsgBox($MB_SYSTEMMODAL, "Error", "Failed to spawn: " & $Command)
14Else
15    MsgBox($MB_SYSTEMMODAL, "Test", "Result: " & $Result)
16EndIf
17
18Exit $Result