Bonjour,
Comment Faire pour récuperer l'etat des checkbox ou des option1?
Avez vous un exemple complet d'utilisation de GUI avec checkbox et option?
Merci
[*]
Code : Tout sélectionner
voici une partie de mon code
$Form1 = GUICreate("Form1", 623, 442, 192, 124)
$Fin = GUICtrlCreateButton("Fin", 56, 352, 209, 49)
$Creation = GUICtrlCreateButton("Creation", 56, 296, 209, 49)
$Group1 = GUICtrlCreateGroup("2G", 32, 40, 257, 129)
$Tronc_Commun = GUICtrlCreateCheckbox("80000086", 48, 64, 161, 25)
$Version142 = GUICtrlCreateRadio("84500145", 48, 96, 233, 33)
$Version143 = GUICtrlCreateRadio("DC/DC", 48, 136, 193, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Options", 312, 40, 201, 153)
$Option1 = GUICtrlCreateCheckbox("Option1", 336, 72, 145, 25)
GUICtrlSetState(-1, $GUI_Enable)
$Option2 = GUICtrlCreateCheckbox("Option2", 336, 102, 145, 25)
GUICtrlSetState(-1, $GUI_ENABLE)
$Option3 = GUICtrlCreateCheckbox("Option3", 336, 131, 145, 25)
GUICtrlSetState(-1, $GUI_ENABLE)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$fic_tronc=""
$fic_version=""
;$fic_version143=""
$path= "C:\DossierTest\dossiercontrole\"
$fic_resultat = ""
$ficracine = "80000086_"
$pdftk = $path & "pdftk.exe "
$opt1=""
$opt2=""
$opt3=""
$fic_Option1 = ""
$fic_Option2 = ""
$fic_Option3 = ""
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $FIN
exit
Case $Radio1
GUISetState
$opt1="_146"
$fic_Option1 = "84500146.pdf"
Case $Radio2
$opt2="_147"
$fic_Option2 = "84500147.pdf"
Case $Radio3
$opt3="_148"
$fic_Option3 = "84500148.pdf"
case $Tronc_commun
$fic_tronc="80000086.pdf"
;MsgBox(0, "Tron", "Tronc commun.")
case $Version142
$fic_version="84500142.mes.pdf"
$fic_resultat ="84500142"
; $Radio1 = GUICtrlCreateCheckbox("Option1", 336, 72, 145, 25)
; GUICtrlSetState(-1, $GUI_ENABLE);
; $Radio2 = GUICtrlCreateCheckbox("Option2", 336, 102, 145, 25)
; GUICtrlSetState(-1, $GUI_ENABLE)
; $Radio3 = GUICtrlCreateCheckbox("Option3", 336, 131, 145, 25);
; GUICtrlSetState(-1, $GUI_ENABLE)
;MsgBox(0, "142", "Version 142.")
case $Version143
$fic_version="84500143.pdf"
$fic_resultat ="84500143"
; $Radio1 = GUICtrlCreateCheckbox("Option1", 336, 72, 145, 25)
; GUICtrlSetState(-1, $GUI_ENABLE)
; $Radio2 = GUICtrlCreateCheckbox("Option2", 336, 102, 145, 25)
; GUICtrlSetState(-1, $GUI_ENABLE)
; $Radio3 = GUICtrlCreateCheckbox("Option3", 336, 131, 145, 25)
; GUICtrlSetState(-1, $GUI_ENABLE)
;MsgBox(0, "143", "Version 143.")
case $Creation
; $pdfttkCommand = $pdftk & $path & $fic_tronc & " " & $path & $fic_version & " " & $path & $fic_Option1 & " " & $path & $fic_Option2 & " " & $path & $fic_Option3 & " cat output " & $path & $ficracine & $fic_resultat & $opt1 & $opt2 & $opt3 & ".mes.pdf" ; lancement du traitement des commandes PIO
$pdfttkCommand = $pdftk & $fic_tronc & " " & $fic_version & " " & $fic_Option1 & " " & $fic_Option2 & " " & $fic_Option3 & " cat output " & $path & $ficracine & $fic_resultat & $opt1 & $opt2 & $opt3 & ".mes.pdf" ; lancement du traitement des commandes PIO
MsgBox(0, "143", $pdfttkCommand)
$val = Run($pdfttkCommand)
$fic_resultat = ""
$fic_Option1 = ""
$fic_Option2 = ""
$fic_Option3 = ""
$opt1=""
$opt2=""
$opt3=""
$pdfttkCommand =""
$fic_version=""
; $Creation = GUICtrlCreateButton("Creation", 56, 296, 209, 49)
; $Group1 = GUICtrlCreateGroup("EM9000 2G", 32, 40, 257, 129)'
; $Tronc_Commun = GUICtrlCreateCheckbox("80000086", 4'8, 64, 161, 25)
; $Version142 = GUICtrlCreateRadio("84500145", 48, 96, 233, 33)
; $Version143 = GUICtrlCreateRadio("Version", 48, 136, 193, 17)
; GUICtrlCreateGroup("", -99, -99, 1, 1)
; $Group2 = GUICtrlCreateGroup("Options", 312, 40, 201, 153)
; $Radio1 = GUICtrlCreateRadio("Option1", 336, 72, 145, 25)
; GUICtrlSetState(-1, $GUI_DISABLE)
; $Radio2 = GUICtrlCreateRadio("Option2", 336, 102, 145, 25)
; GUICtrlSetState(-1, $GUI_DISABLE)
; $Radio3 = GUICtrlCreateRadio("Option3", 336, 131, 145, 25)
; GUICtrlSetState(-1, $GUI_DISABLE)
; GUICtrlCreateGroup("", -99, -99, 1, 1)
; GUISetState(@SW_SHOW)
;MsgBox(0, "Creation", "Creation.")
EndSwitch
WEnd