Code : Tout sélectionner
#include <GuiConstants>
#NoTrayIcon
$VOLC = DriveGetLabel("C:\")
$CVOLC = "C:\" & $VOLC
$TOTALC = DriveSpaceTotal("C:\")
$FREEC = DriveSpaceFree("C:\")
$VOLD = DriveGetLabel("D:\")
$DVOLD = "D:\" & $VOLD
$TOTALD = DriveSpaceTotal("D:\")
$FREED = DriveSpaceFree("D:\")
$VOLE = DriveGetLabel("E:\")
;$TOTALE = DriveSpaceTotal("E:\")
;$FREEE = DriveSpaceFree("E:\")
$VOLF = DriveGetLabel("F:\")
;$TOTALF = DriveSpaceTotal("F:\")
;$FREEF = DriveSpaceFree("F:\")
$VOLG = DriveGetLabel("G:\")
;$TOTALG = DriveSpaceTotal("G:\")
;$FREEG = DriveSpaceFree("G:\")
$VOLH = DriveGetLabel("H:\")
;$TOTALH = DriveSpaceTotal("H:\")
;$FREEH = DriveSpaceFree("H:\")
$VOLI = DriveGetLabel("I:\")
;$TOTALI = DriveSpaceTotal("I:\")
;$FREEI = DriveSpaceFree("I:\")
$VOLJ = DriveGetLabel("J:\")
;$TOTALJ = DriveSpaceTotal("J:\")
;$FREEJ = DriveSpaceFree("J:\")
$VOLK = DriveGetLabel("K:\")
;$TOTALK = DriveSpaceTotal("K:\")
;$FREEK = DriveSpaceFree("K:\")
$VOLL = DriveGetLabel("L:\")
;$TOTALL = DriveSpaceTotal("L:\")
;$FREEL = DriveSpaceFree("L:\")
$VOLM = DriveGetLabel("M:\")
;$TOTALM = DriveSpaceTotal("M:\")
;$FREEM = DriveSpaceFree("M:\")
$VOLN = DriveGetLabel("N:\")
;$TOTALN = DriveSpaceTotal("N:\")
;$FREEN = DriveSpaceFree("N:\")
$VOLO = DriveGetLabel("O:\")
;$TOTALO = DriveSpaceTotal("O:\")
;$FREEO = DriveSpaceFree("O:\")
$VOLP = DriveGetLabel("P:\")
;$TOTALP = DriveSpaceTotal("P:\")
;$FREEP = DriveSpaceFree("P:\")
$VOLQ = DriveGetLabel("Q:\")
;$TOTALQ = DriveSpaceTotal("Q:\")
;$FREEQ = DriveSpaceFree("Q:\")
$VOLR = DriveGetLabel("R:\")
;$TOTALR = DriveSpaceTotal("R:\")
;$FREER = DriveSpaceFree("R:\")
$VOLS = DriveGetLabel("S:\")
;$TOTALS = DriveSpaceTotal("S:\")
;$FREES = DriveSpaceFree("S:\")
$VOLT = DriveGetLabel("T:\")
;$TOTALT = DriveSpaceTotal("T:\")
;$FREET = DriveSpaceFree("T:\")
$VOLU = DriveGetLabel("U:\")
;$TOTALU = DriveSpaceTotal("U:\")
;$FREEU = DriveSpaceFree("U:\")
$VOLV = DriveGetLabel("V:\")
;$VVOLV = "V:\" & $VOLV
$TOTALV = DriveSpaceTotal("V:\")
$FREEV = DriveSpaceFree("V:\")
$VOLW = DriveGetLabel("W:\")
;$TOTALW = DriveSpaceTotal("W:\")
;$FREEW = DriveSpaceFree("W:\")
$VOLX = DriveGetLabel("X:\")
;$TOTALX = DriveSpaceTotal("X:\")
;$FREEX = DriveSpaceFree("X:\")
$VOLY = DriveGetLabel("Y:\")
;$TOTALY = DriveSpaceTotal("Y:\")
;$FREEY = DriveSpaceFree("Y:\")
$VOLZ = DriveGetLabel("Z:\")
;$TOTALZ = DriveSpaceTotal("Z:\")
;$FREEZ = DriveSpaceFree("Z:\")
GuiCreate("ATP_DriveInfo _-_BETA_-_ Build 0198", 469, 639,(@DesktopWidth-469)/2, (@DesktopHeight-639)/2) ;, $WS_EX_STATICEDGE)
GUICtrlCreateLabel("Fichier généré le " & @MDAY & "-" & @MON & "-" & @YEAR & " à " & @HOUR & ":" & @MIN & ":" & @SEC, 180, 490, 280, 20, $SS_RIGHT)
;GUICtrlCreateLabel("Caractéristiques du disque système:", 10, 120, 180, 20)
;$VolumeLabel = GuiCtrlCreateLabel("C: Nom:", 30, 140, 150, 20)
;$Input_VolumeLabel = GUICtrlCreateLabel("" & $VOLC, 180, 140, 280, 20)
;$TotalSpace = GuiCtrlCreateLabel("C: Espace total:", 30, 160, 150, 20)
;$Input_TotalSpace = GUICtrlCreateLabel("" & Round(($TOTALC)/1024,2) & " Go", 180, 160, 280, 20)
;$FreeSpace = GuiCtrlCreateLabel("C: Espace libre:", 30, 180, 150, 20)
;$Input_FreeSpace = GUICtrlCreateLabel("" & Round(($FREEC)/1024,2) & " Go", 180, 180, 280, 20)
GUICtrlCreateLabel("Caractéristiques des disques:", 10, 120, 180, 20)
$VolumeLabel = GuiCtrlCreateLabel("Nom:", 30, 140, 150, 20)
$TotalSpace = GuiCtrlCreateLabel("Espace total:", 30, 160, 150, 20)
$FreeSpace = GuiCtrlCreateLabel("Espace libre:", 30, 180, 150, 20)
$n1 = GUICtrlCreateCombo ("Choisissez un disque...", 180, 136, 130, 20, -1)
$Choice = GUICtrlSetData (-1, "C:\|D:\|E:\|V:\" , "Choisissez un disque...")
$Choice2=GUICtrlSetData (-1, $CVOLC )
$Choice2=GUICtrlSetData (-1, $DVOLD )
$Choice2=GUICtrlSetData(-1,"E:\" & $VOLE)
;GUICtrlSetData(-1,"F:\" & $VOLF)
;GUICtrlSetData(-1,"G:\" & $VOLG)
;GUICtrlSetData(-1,"H:\" & $VOLH)
;GUICtrlSetData(-1,"I:\" & $VOLI)
;GUICtrlSetData(-1,"J:\" & $VOLJ)
;GUICtrlSetData(-1,"K:\" & $VOLK)
;GUICtrlSetData(-1,"L:\" & $VOLL)
;GUICtrlSetData(-1,"M:\" & $VOLM)
;GUICtrlSetData(-1,"N:\" & $VOLN)
;GUICtrlSetData(-1,"O:\" & $VOLO)
;GUICtrlSetData(-1,"P:\" & $VOLP)
;GUICtrlSetData(-1,"Q:\" & $VOLQ)
;GUICtrlSetData(-1,"R:\" & $VOLR)
;GUICtrlSetData(-1,"S:\" & $VOLS)
;GUICtrlSetData(-1,"T:\" & $VOLT)
;GUICtrlSetData(-1,"U:\" & $VOLU)
;$Choice=GUICtrlSetData(-1,"V:\" & $VOLV)
;GUICtrlSetData(-1,"W:\" & $VOLW)
;GUICtrlSetData(-1,"X:\" & $VOLX)
;GUICtrlSetData(-1,"Y:\" & $VOLY)
;GUICtrlSetData(-1,"Z:\" & $VOLZ)
; Fonction ChoixDuDisque
Func _DiskChoice ()
$Choice = GUICtrlRead ( $n1 )
Switch $Choice
Case "C:\"
GUICtrlCreateLabel("" & Round(($TOTALC)/1024,2) & " Go", 180, 160, 280, 20)
GUICtrlCreateLabel("" & Round(($FREEC)/1024,2) & " Go", 180, 180, 280, 20)
Case 'D:\'
GUICtrlCreateLabel("" & Round(($TOTALD)/1024,2) & " Go", 180, 160, 280, 20)
GUICtrlCreateLabel("" & Round(($FREED)/1024,2) & " Go", 180, 180, 280, 20)
Case "E:\"
GUICtrlCreateLabel("" & Round(($TOTALE)/1024,2) & " Go", 180, 160, 280, 20)
GUICtrlCreateLabel("" & Round(($FREEE)/1024,2) & " Go", 180, 180, 280, 20)
Case "V:\" Then
GUICtrlCreateLabel("" & Round(($TOTALV)/1024,2) & " Go", 180, 160, 280, 20)
GUICtrlCreateLabel("" & Round(($FREEV)/1024,2) & " Go", 180, 180, 280, 20)
EndSwitch
EndFunc ; == >_DiskChoice
;While 1
; $msg = GUIGetMsg()
; Select
;case $msg = "Choisissez un disque...";
; GUICtrlCreateLabel("" & " Go", 180, 160, 280, 20)
; GUICtrlCreateLabel("" & " Go", 180, 180, 280, 20)
; Exit
;
;
;Case $msg = "C:\"
; GUICtrlCreateLabel("" & Round(($TOTALD)/1024,2) & " Go", 180, 160, 280, 20)
; GUICtrlCreateLabel("" & Round(($FREED)/1024,2) & " Go", 180, 180, 280, 20)
;Exit
; ;If $msg = $GUI_EVENT_CLOSE Then ExitLoop
;EndSelect
;If $msg = GUICtrlSetData(-1,"V:\" & $VOLV) Then
;GUICtrlCreateLabel("" & Round(($TOTALV)/1024,2) & " Go", 180, 160, 280, 20)
; GUICtrlCreateLabel("" & Round(($FREEV)/1024,2) & " Go", 180, 180, 280, 20)
;If $msg = GUICtrlSetData(-1,"C:\" & $VOLC) Then
; GUICtrlCreateLabel("" & Round(($TOTALC)/1024,2) & " Go", 180, 160, 280, 20)
; GUICtrlCreateLabel("" & Round(($FREEC)/1024,2) & " Go", 180, 180, 280, 20)
;EndIf
;~ ;EndIf
;EndIf
;Wend
;$Input_Date_Time = GUICtrlCreateLabel("Fichier généré le " & @MDAY & "-" & @MON & "-" & @YEAR & " à " & @HOUR & ":" & @MIN & ":" & @SEC, 180, 490, 280, 20, $SS_RIGHT)
GuiSetState()
While 1
$msg = GuiGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case Else
;;;
EndSelect
WEnd
Exit