From aa9077d668909f029c464b4bd7b7f5c0aed36da1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipok?= Date: Wed, 1 Apr 2020 03:04:55 +0200 Subject: [PATCH] Update _Console_Attach.au3 CleanUp --- Examples/_Console_Attach.au3 | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Examples/_Console_Attach.au3 b/Examples/_Console_Attach.au3 index 1bc5f37..4e4c556 100644 --- a/Examples/_Console_Attach.au3 +++ b/Examples/_Console_Attach.au3 @@ -1,17 +1,20 @@ +#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 +#include '..\Console.au3' -#include - -$iPid = Run("cmd.exe") -ProcessWait($iPid) +_Example() +Exit -_Console_Attach($iPid) +Func _Example() -$aSize = _Console_GetScreenBufferSize() + Local $iPid = Run("cmd.exe") + ProcessWait($iPid) -$sHeader = _Console_ReadOutputCharacter(-1, $aSize[0], 0, 0) + _Console_Attach($iPid) + Local $aSize = _Console_GetScreenBufferSize() + Local $sHeader = _Console_ReadOutputCharacter(-1, $aSize[0], 0, 0) -MsgBox(0, "Test", $sHeader) + MsgBox(0, "Test", $sHeader) -_Console_Free() -ProcessClose($iPid) -Exit + _Console_Free() + ProcessClose($iPid) +EndFunc ;==>_Example