Code : Tout sélectionner
#include <GUIConstantsEx.au3>
$img1 = @tempdir & "\pano1.jpg"
InetGet("http://static.passetoncode.fr/img-panneaux/panneaux/interdiction/mini_b2c.jpg", $img1)
$img2 = @tempdir & "\pano2.jpg"
InetGet("http://static.passetoncode.fr/img-panneaux/panneaux/interdiction/mini_b3.jpg", $img2)
Global $rad_ok, $count = 1
$gui = GUICreate("My GUI picture", 400, 180)
$pic = GUICtrlCreatePic("", 10, 10, 150, 150)
$rad1 = GUICtrlCreateRadio("", 180, 30, 200, 20)
$rad2 = GUICtrlCreateRadio("", 180, 60, 200, 20)
$rad3 = GUICtrlCreateRadio("", 180, 90, 200, 20)
$btn1 = GUICtrlCreateButton("Valider", 200, 130, 80, 25)
$btn2 = GUICtrlCreateButton("Suivant", 300, 130, 80, 25)
_Update($count)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $btn1
_Test()
Case $btn2
$count += 1
_Update($count)
EndSwitch
WEnd
Func _Update($nb)
Switch $nb
Case 1
GUICtrlSetImage($pic, $img1)
GUICtrlSetData($rad1, "Ne pas jeter d'objets en l'air")
GUICtrlSetData($rad2, "Défense d'uriner")
GUICtrlSetData($rad3, "Interdiction de faire demi-tour")
$rad_ok = $rad3
Case 2
GUICtrlSetImage($pic, $img2)
GUICtrlSetData($rad1, "Interdiction de dépasser")
GUICtrlSetData($rad2, "Interdit aux voitures rouges")
GUICtrlSetData($rad3, "Interdit aux voitures noires")
$rad_ok = $rad1
Case Else
GuiDelete($gui)
Exit Msgbox(0,"", "y en a plus !")
EndSwitch
EndFunc
Func _Test()
If GuiCtrlRead($rad_ok) = 1 Then
Msgbox(0,"", "bravo !")
Else
Msgbox(0,"", "non !")
EndIf
EndFunc