Voici une solution pour faire le choix entre trois boutons.
Le script affiche une fenêtre avec trois boutons, une fois le choix est fait, vous cliquez sur next, puis dans la fenêtre qui suit, le nom du choix que vous avez fait s'affiche en bleu.
Je vous laisse le temps pour étudier le fonctionnement de mon script.
J'espère qu'un jour il sera utile pour quelqu'un qui fera ces début avec Autoit.
► Afficher le texte
Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ComboConstants.au3>
#include <ProgressConstants.au3>
#include <EditConstants.au3>
Global $radioval1, $T_install
#Region ### START Koda GUI section ### Form= 1er form avec juste go
$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$Label1_1 = GUICtrlCreateLabel("Test pour le choix de menu", 64, 64, 393, 33)
GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
$Go = GUICtrlCreateButton("Go", 232, 264, 113, 57)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
#Region ### START Koda GUI section ### Form= form choix des bouttons
$Form2 = GUICreate("Form1", 615, 438, 205, 127)
$Label1_2 = GUICtrlCreateLabel("Faire un choix parmi les sections suivantes :", 64, 64, 517, 33)
GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
$Next = GUICtrlCreateButton("Next >", 264, 328, 113, 57)
GUICtrlSetState($Next, $GUI_Disable)
$R_1 = GUICtrlCreateRadio("Choix 1", 88, 152, 145, 25)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$R_2 = GUICtrlCreateRadio("Choix2", 88, 216, 145, 17)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$R_3 = GUICtrlCreateRadio("Choix3", 88, 272, 145, 25)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_ENABLE)
#EndRegion ### END Koda GUI section ###
#Region ### START Koda GUI section ### Form= finish avec back
$Form3 = GUICreate("Form1", 615, 438, 200, 127)
$Finish = GUICtrlCreateButton("Finish", 368, 328, 113, 57)
$Label1_3 = GUICtrlCreateLabel("Votre choix est :", 64, 128, 190, 33)
GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
$Label2_3 = GUICtrlCreateLabel("Label2", 280, 216, 66, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000080)
$Back = GUICtrlCreateButton("< Back", 200, 328, 113, 57)
GUISetState(@SW_ENABLE)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Select
Case $nMsg=$GUI_EVENT_CLOSE
Exit
Case $nMsg=$Finish
Exit
Case $nMsg=$Go
GUISetState(@SW_HIDE, $Form1) ; On masque la GUI 1
GUISetState(@SW_SHOWNORMAL, $Form2) ;
Case $nMsg=$Next
GUISetState(@SW_HIDE, $Form2) ; On masque la GUI 2
GUISetState(@SW_SHOWNORMAL, $Form3) ;
_Ver_radio_V_I($radioval1, $T_install)
GUICtrlSetData ($Label2_3,$T_install)
Case $nMsg=$Back
GUISetState(@SW_HIDE, $Form3) ; On masque la GUI3
GUISetState(@SW_SHOWNORMAL, $Form2) ;
Case $nMsg >= $R_1 And $nMsg <= $R_3
;GUICtrlSetState($Label2_3, $GUI_enable)
GUICtrlSetState($Next, $GUI_enable)
$radioval1 = $nMsg - $R_1
EndSelect
WEnd
Func _Ver_radio_V_I($radioval1, ByRef $T_install_int)
If $radioval1 = 0 Then
$T_install_int = "Choix1"
ElseIf $radioval1 = 1 Then
$T_install_int = "Choix2"
ElseIf $radioval1 = 2 Then
$T_install_int = "Choix3"
EndIf
EndFunc ;==>_Ver_radio_V_I