;Eviter que la fenetre se ferme a chaque clic
;Apparition fondu
;Clic droit : About
;DJSIR (About this mac)
;Icone barre des taches
#NoTrayIcon
;Includes
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
;Pour plus tard
;#include <SliderConstants.au3>
;#include <GUIConstantsEx.au3>
;#include <EditConstants.au3>
; Informations
$ObjWMIService = ObjGet("winmgmts:{impersonationLevel = impersonate}!\\.\root\cimv2")
$ColSettings = $ObjWMIService.ExecQuery("Select * from Win32_Processor")
For $ObjOperatingSystem In $ColSettings
$ProcFreq = $ObjOperatingSystem.CurrentClockSpeed
$ProcName = $ObjOperatingSystem.Name
Next
;Noms
$dgl = DriveGetLabel(@HomeDrive)
$mem = MemGetStats()
;Images dans %temp%
Dim $pic1 = @TempDir & "\Haut.jpg"
FileInstall("Haut.jpg", @TempDir & "\Haut.jpg", 1)
Dim $pic2 = @TempDir & "\Gauche.jpg"
FileInstall("Gauche.jpg", @TempDir & "\Gauche.jpg", 1)
Dim $pic3 = @TempDir & "\Droite.jpg"
FileInstall("Droite.jpg", @TempDir & "\Droite.jpg", 1)
Dim $pic4 = @TempDir & "\Millieu.jpg"
FileInstall("Millieu.jpg", @TempDir & "\Millieu.jpg", 1)
Dim $pic5 = @TempDir & "\Bas.jpg"
FileInstall("Bas.jpg", @TempDir & "\Bas.jpg", 1)
;Fênetre
$Form1 = GUICreate("About This Mac", 291, 370, -1, -1, $WS_EX_LAYERED, $WS_EX_TOOLWINDOW)
;Image
$pic1 = GUICtrlCreatePic($pic1, 0, 0, 291, 161, BitOR($WS_GROUP, $WS_CLIPSIBLINGS))
$pic2 = GUICtrlCreatePic($pic2, 0, 161, 64, 179, BitOR($WS_GROUP, $WS_CLIPSIBLINGS))
$pic3 = GUICtrlCreatePic($pic3, 232, 161, 59, 179, BitOR($WS_GROUP, $WS_CLIPSIBLINGS))
$pic4 = GUICtrlCreatePic($pic4, 60, 180, 180, 111, BitOR($WS_GROUP, $WS_CLIPSIBLINGS))
$pic5 = GUICtrlCreatePic($pic5, 0, 290, 291, 54, BitOR($WS_GROUP, $WS_CLIPSIBLINGS))
;Boutons
$Button1 = GUICtrlCreateButton("Mise a jour de logiciel ....", 59, 161, 180, 24, 0)
$Button2 = GUICtrlCreateButton("Plus d'infos ....", 59, 273, 179, 24, 0)
;Processeur
GUICtrlCreateLabel("Processeur :", 75, 200, 140, 15)
GUICtrlSetFont(-1, 8.5, 800)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlCreateLabel(Round($ProcFreq/1000,2) & " GHz " , 150, 200)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
;Mémoire vive
GUICtrlCreateLabel("Mémoire vive :", 63, 220, 140, 15)
GUICtrlSetFont(-1, 8.5, 800)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlCreateLabel(Round($mem[1] / 1024, 0) & " Mo", 150, 220)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
;Disque de lancement
GUICtrlCreateLabel("Disque de démmarage :", 13, 240, 140, 15)
GUICtrlSetFont(-1, 8.5, 800)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlCreateLabel($dgl, 150, 240)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button1
;Bouton à faire (ACCES A INTERNET EXPLORER SUR L'ADERESSE
http://update.microsoft.com/
Exit
Case $Button2
Send("#{PAUSE}")
Exit
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd