Me revoila !!! , déjà désolé de ne pas avoir poster ou il ne fallait pas, parfois je suis tête en l'air.
Alors je pense avoir compris en gros comment ca fonctionne. j'ai meme réussi a enregistrer ce qui y'a d'écrit dans un input. voici mon code :
Code : Tout sélectionner
#include <GUIConstants.au3>
dim $obtient
Opt("GUIOnEventMode", 1) ; Change to OnEvent mode
$mainwindow = GUICreate("Hello World", 200, 100)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GUICtrlCreateLabel("Hello world! How are you?", 30, 10)
$Enregistrer = GUICtrlCreateInput("",0,80,60)
$okbutton = GUICtrlCreateButton("OK", 70, 50, 60)
GUICtrlSetOnEvent($okbutton, "OKButton")
GUICtrlSetOnEvent($Enregistrer, "Enregistrer")
GUISetState(@SW_SHOW)
While 1
Sleep(1000) ; Idle around
WEnd
Func OKButton()
;Note: at this point @GUI_CTRLID would equal $okbutton,
;and @GUI_WINHANDLE would equal $mainwindow
MsgBox(0, "GUI Event", "You pressed OK! and write "&$obtient)
EndFunc
func enregistrer()
$obtient=GUICtrlRead($Enregistrer)
EndFunc
Func CLOSEClicked()
;Note: at this point @GUI_CTRLID would equal $GUI_EVENT_CLOSE,
;and @GUI_WINHANDLE would equal $mainwindow
MsgBox(0, "GUI Event", "You clicked CLOSE! Exiting...")
Exit
EndFunc
Toutefois, je me pose toujours des questions, comment savoir ce que va inclure un include?
Je ne comprend pas ce que fais la commande opt et son option.
Pour finir je me demande ce qui declare les variables $mainwindows,$GUI_EVENT_CLOSE,$Enregistrer....