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

