Code : Tout sélectionner
#cs ----------------------------------------------------------------------------
#ce ----------------------------------------------------------------------------
#include <GuiConstants.au3>
#NoTrayIcon
; Déclaration des variables.
Global $Largeur = 400, $Hauteur = 300, $Titre = "Form1 "
Local $Ver = "V1.0"
#region ### START Koda GUI section ###
; Fenetre principale.
$Form1 = GUICreate($Titre & $Ver, $Largeur, $Hauteur, -1, -1)
;cases à cocher
$ini_case1 = "test1"
$case1 = GUICtrlCreateCheckbox($ini_case1, 10, 10, 120, 20)
$ini_case2 = "test2"
$case2 = GUICtrlCreateCheckbox($ini_case2, 10, 30, 120, 20)
$ini_case3 = "test3"
$case3 = GUICtrlCreateCheckbox($ini_case3, 10, 50, 120, 20)
$ini_case4 = "test4"
$case4 = GUICtrlCreateCheckbox($ini_case4, 10, 70, 120, 20)
; Bouton OK.
$Button1 = GUICtrlCreateButton("GO", 150, 250, 75, 25)
GUISetState(@SW_SHOW)
#endregion ### START Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Fin()
Case $Button1
For $i = 1 To 4
If BitAND(GUICtrlRead(Eval("case" & $i)), $GUI_CHECKED) Then
MsgBox(0,"case","case" & $i)
GUICtrlSetState("case" & $i,$GUI_UNCHECKED)
EndIf
Next
EndSwitch
WEnd
#region ################### Fonctions ###################
Func Fin()
; Lancement du splash screen.
SplashTextOn("", "Fermeture du script en cours, Veuillez patienter ...", 450, 70, -1, -1, 0 + 1 + 16 + 32, "Times New Roman", 12, 800)
; Pause de 1 seconde.
Sleep(1000)
; Fermeture du splash.
SplashOff()
Exit
EndFunc ;==>Fin
#endregion ################### Fonctions ###################