Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global Const $LOG = @HomeDrive & "\LOG.txt"
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 615, 183, 192, 124)
Global $Button1 = GUICtrlCreateButton("BIG Button1", 40, 16, 545, 105)
Global $Button2 = GUICtrlCreateButton("Quitter", 40, 144, 537, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
FileWrite($LOG, @CRLF & @TAB & "--- TEST --- ")
ShellExecuteWait($LOG, "", @ScriptDir, "open")
Case $Button2
Exit
EndSwitch
WEnd