Bonjour, je me sert de cette fonction pour utiliser un edit comme console :
► Afficher le texte
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <ScrollBarConstants.au3>;fonction message
#Include <GuiEdit.au3>;fonction message
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 219, 143, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 72, 112, 75, 25)
$Edit1 = GUICtrlCreateEdit("", 16, 8, 185, 89,BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))
GUICtrlSetData(-1, "")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $x = 0
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$x = $x +1
Message("Button1 was pressed!! " & $x)
EndSwitch
WEnd
Func Message($sMessage)
Local $sTexte = GUICtrlRead($Edit1)
GUICtrlSetData($Edit1, $sTexte & $sMessage & @CRLF)
_GUICtrlEdit_Scroll($Edit1, $SB_SCROLLCARET)
EndFunc
Tu appel la fonction avec le message a afficher en paramètre.