Today i am sharing one of my lil' tool.
Actually its the one i used the most. (almost 1000 times a day)
And when i was relooking it today, i thought that maybe someone would like to use it aswell
It's not a kick ass script, like you would see at lazlo's or titan's T_T .... but anyway, im quite proud of it as there wasn't anyone who posted something similar before.
The gui is adaptative, which means depending on how many drives you got, and the size on it, the aligement will still be good, and hopefully the gui will not be messy (Still, if there are bugs report them!).
And yes, there are no useless pixel, everything was calculated just to be slick... using a magnifier proggy to be sure of it x_x
CTRL+SHIFT+S => show the gui.... that's all you need to know...
This tool is made for use with programming fonts (single spaced), or the alignements will be really messy
You can change it in the script.
My favourite : S8 Dina ^^"
Download Dina Font
So, here we are :
#SingleInstance Force SetBatchLines, -1 SetFormat, float, 5.1 Menu, Tray, Add, Exit Menu, Tray, Tip, Free Space Menu, Tray, Nostandard Return GuiEscape: Default: ^+s:: If Toggle { Gui, Destroy Toggle-- } Else { Gosub, Get_List Gosub, Gui_Create Gui, Show, w178 h%Height%, Free Space WinSet, Region, % "0-8 3-6 9-6 9-1 64-1 64-6 176-6 178-8 178-"Height-4 " 175-"Height " 2-"Height " 0-"Height-4, Free Space Toggle++ } Return Get_List: DrvNum = 0 DriveGet, FD_List, List, Fixed Loop Parse, FD_List { Spaces := " " DriveGet, Cap_%A_LoopField%, Cap, %A_LoopField%:\ DriveSpaceFree, Free_Space, %A_LoopField%:\ ;Get the free space in each drive Percent_Free := Free_Space / (Cap_%A_LoopField%) * 100 If (Free_Space > 1000) { SetFormat, Float, 0.3 Free_Space = %Free_Space%.0 ;Treat free space like a float Free_Space /= 1000 Unit = Go StringTrimRight, Spaces, Spaces, % (Strlen(Free_Space) - 1) ;Reduce the number of spaces } Else { StringTrimRight, Spaces, Spaces, % (Strlen(Free_Space) - 1) Unit = Mo } SetFormat, float, 5.1 Result := (Result . A_LoopField ":\" Spaces . Free_Space " " Unit " [" Percent_Free "%] `n") ;Create the list DrvNum++ ;Count drives } StringTrimRight, Result, Result, 1 ;Delete the tailing linefeed char Return Gui_Create: Height := 17+12*DrvNum ;Height depends on how many drives are present Gui, Margin, x0, y0 Gui, Add, GroupBox, x0 y0 w178 h%Height%, Free Space Gui, -Caption +AlwaysOnTop +ToolWindow Gui, Font, s8, Dina Gui, Add, Text, xp+9 yp+13, %Result% Result = ;Frees the result list Return Exit: ExitApp
Please feel free to add any comments.
Updates : Fixed bug with number format and unit.