Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <ImageListConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;GUI1
#Region ### START Koda GUI section ### Form=C:\Documents and Settings\******\Bureau\Programmes\Fenêtre Koda\Programme erreur\Fen1.kxf
Local $Fen1 = GUICreate("Mis à jour Windows", 385, 150, 186, 116)
GUISetIcon("C:\Documents and Settings\*******\Bureau\IconExtract\icons\xpsp2res_4.ico")
$ImageList1 = _GUIImageList_Create(16, 16, 5)
_GUIImageList_AddIcon($ImageList1, "C:\Documents and Settings\********\Bureau\IconExtract\icons\xpsp2res_4.ico", 0, True)
Local $Label1 = GUICtrlCreateLabel("Nouvelles mis à jours Windows.", 112, 16, 127, 17)
Local $Label2 = GUICtrlCreateLabel("Mettre à jour l'ordinateur ?", 128, 48, 85, 17)
Local $Button1 = GUICtrlCreateButton("Oui", 96, 96, 49, 25, $WS_GROUP)
Local $Button2 = GUICtrlCreateButton("Non", 207, 96, 49, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;GUI1
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
MsgBox (0,"Erreur Windows", "Vous avez interrompu la mis à jour")
Exit
Case $Button2
MsgBox (0,"Erreur Windows", "Vous avez interrompu la mis à jour")
Exit
Case $Button1
$Fen1 = GUISetState(@SW_HIDE)
EndSwitch
WEnd
;GUI2
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\documents and settings\**********\bureau\programmes\fenêtre koda\form1.kxf
Local $Form1 = GUICreate("Mis à jours de Windows", 314, 184, 227, 127)
GUISetBkColor(0xD4D0C8)
Local $Group1 = GUICtrlCreateGroup("Mis à jours", 0, 54, 185, 113)
Local $Label1 = GUICtrlCreateLabel("- Suppression des erreurs Windows", 8, 78, 170, 17)
Local $Label2 = GUICtrlCreateLabel("- Réparation des clefs de registres", 8, 142, 164, 17)
Local $Label3 = GUICtrlCreateLabel("- Mis à jours des utilitaires Windows", 8, 110, 170, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Local $Progress1 = GUICtrlCreateProgress(-16, 14, 321, 25)
Local $Group2 = GUICtrlCreateGroup("", 240, 158, 73, 25)
Local $Label4 = GUICtrlCreateLabel("LOL©", 248, 166, 57, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;GUI2
$Pourcentage = 0
While 1
$nMsg = GuiGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case GUICtrlSetData ( $Progress1, $Pourcentage)
Sleep ( 1000 )
$Pourcentage+=1
MsgBox(64, "Information Windows", "Les mis à jours de Windows ont été installées")
EndSwitch
WEnd