gregnottage Posted August 24, 2007 Share Posted August 24, 2007 Hi Guys, I've adapted the help file code to display the relevant hard drive settings in a message box. I'd like to make all of the drive details appear on one box. Please can you tell me what changes I need to make to my script to display all the drive data on one message box? Here's my script: CODE;Check partition sizes and display in a msgbox $var = DriveGetDrive( "fixed" ) If NOT @error Then For $i = 1 to $var[0] $Total = StringFormat("%.2f",(DriveSpaceTotal($var[$i]))/1024); Total size in GB $Free = StringFormat("%.2f",(DriveSpaceFree($var[$i]))/1024); Free space in GB $Used = $Total - $Free ; Calculate difference which is used space in GB ;Display in msgbox MsgBox (0, "Drive details", "Drive " & $i & " = " & $var[$i] & @CRLF & @CRLF & " Used Space = " & $Used & " GB" & @CRLF & " Free Space = " & $Free & " GB" & @CRLF & @CRLF & " Partition Size = " & $Total & " GB") Next EndIf Thanks in advance ;-) Kind Regards, Greg. Link to comment Share on other sites More sharing options...
ChrisL Posted August 24, 2007 Share Posted August 24, 2007 $var = DriveGetDrive( "fixed" ) If NOT @error Then $string = "" For $i = 1 to $var[0] $Total = StringFormat("%.2f",(DriveSpaceTotal($var[$i]))/1024); Total size in GB $Free = StringFormat("%.2f",(DriveSpaceFree($var[$i]))/1024); Free space in GB $Used = $Total - $Free; Calculate difference which is used space in GB ;Display in msgbox $string &= "Drive " & $i & " = " & $var[$i] & @CRLF & @CRLF & " Used Space = " & $Used & " GB" & @CRLF & " Free Space = " & $Free & " GB" & @CRLF & @CRLF & " Partition Size = " & $Total & " GB" & @crlf & @crlf Next MsgBox (0, "Drive details",$string) EndIf [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
gregnottage Posted August 24, 2007 Author Share Posted August 24, 2007 Oh superb!! Thanks so much for the swift response - it's HUGELY appreciated ;-) Kindest Regards, Greg. Link to comment Share on other sites More sharing options...
ChrisL Posted August 24, 2007 Share Posted August 24, 2007 Oh superb!! Thanks so much for the swift response - it's HUGELY appreciated ;-)Kindest Regards,Greg. Your welcome [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now