xboxscene.org forums

Pages: 1 [2]

Author Topic: Hard Drive, Free And Used Space Display  (Read 1353 times)

TMG8

  • Archived User
  • Full Member
  • *
  • Posts: 210
Hard Drive, Free And Used Space Display
« Reply #15 on: January 08, 2005, 01:57:00 PM »

nice job MrSin and Dazza, i took the code it worked great, i didnt really think i needed the ip showing since there is the network settings tab so i went and added bios version and dash version instead, here is the code to do as so.....

CODE
//
//  HDD Space.
//
function GetXboxHardDiskStats()
{
      var DDPartition;
      var nFreeSpace = 0;
      var nTotalSpace = 0;
      var nArraySize = 4; // Needs to be 4 for everything else to fit
      var xboxInfo = "         XBOX INFORMATION\r";
      var nIntTemp = theConfig.GetInternalTemp();
      var nCPUTemp = theConfig.GetCPUTemp();
      var nROMVersion = theConfig.GetROMVersion();
      var nXdashVersion = theConfig.GetXdashVersion();

      DDPartition = new Array(nArraySize);

      DDPartition[1] = "C:";
      DDPartition[2] = "E:";
      DDPartition[3] = "F:";
      DDPartition[4] = "G:";

      for (var i = 1; i < nArraySize + 1; i = i + 1)
      {
              nFreeSpace = theHardDrive.GetFreeSpace(DDPartition + "\\");
              nTotalSpace = theHardDrive.GetTotalSpace(DDPartition + "\\");
              if(nTotalSpace != 0){
                      xboxInfo = xboxInfo + DDPartition + " " + nFreeSpace + "MB of " + nTotalSpace + "MB\r";
              }
       }
      xboxInfo = xboxInfo + "\r";
      xboxInfo = xboxInfo + "\nK: " + nROMVersion + "\rD: " + nXdashVersion + "\r";   //Show Dash  & Bios Version
      xboxInfo = xboxInfo + "Int Temp: " + nIntTemp + "C  CPU Temp: " + nCPUTemp + " C\r"; // Show Temps
      TellUser(theTranslator.Translate(xboxInfo),"");
}
//
//  End.
//


this is really my first time ever posting any code so i hope it works... and first time ever making something work nicely in a dash too! have fun with it
Logged

TMG8

  • Archived User
  • Full Member
  • *
  • Posts: 210
Hard Drive, Free And Used Space Display
« Reply #16 on: January 08, 2005, 03:06:00 PM »

hmm well i wasnt able to edit my post but i wanted to update....
The ip address is shown as well as bios version and dash. with this little menu you are able to most likely add one more display but for now heres the code
CODE
//
//  HDD Space.
//
function GetXboxHardDiskStats()
{
      var DDPartition;
      var nFreeSpace = 0;
      var nTotalSpace = 0;
      var nArraySize = 4; // Needs to be 4 for everything else to fit
      var xboxInfo = "         XBOX INFORMATION\r";
      var nIntTemp = theConfig.GetInternalTemp();
      var nCPUTemp = theConfig.GetCPUTemp();
      var nROMVersion = theConfig.GetROMVersion();
      var nXdashVersion = theConfig.GetXdashVersion();
      var sIPAddress = theXboxNetwork.GetXboxIP();

      DDPartition = new Array(nArraySize);

      DDPartition[1] = "C:";
      DDPartition[2] = "E:";
      DDPartition[3] = "F:";
      DDPartition[4] = "G:";

      for (var i = 1; i < nArraySize + 1; i = i + 1)
      {
              nFreeSpace = theHardDrive.GetFreeSpace(DDPartition + "\\");
              nTotalSpace = theHardDrive.GetTotalSpace(DDPartition + "\\");
              if(nTotalSpace != 0){
                      xboxInfo = xboxInfo + DDPartition + " " + nFreeSpace + "MB of " + nTotalSpace + "MB\r";
              }
       }
      xboxInfo = xboxInfo + "\r";
      xboxInfo = xboxInfo + "\nK: " + nROMVersion + "\rD: " + nXdashVersion + " IP: " + sIPAddress + "\r";     //Show Dash  & Bios Version
      xboxInfo = xboxInfo + "MB Temp: " + nIntTemp + "C  CPU Temp: " + nCPUTemp + " C\r"; // Show Temps
      TellUser(theTranslator.Translate(xboxInfo),"");
}
//
//  End.
//  


its pretty simple maybe i should have payed attention in class, but i think im remembering things now...  tongue.gif  well anyways i hope this info is helpful.
Logged

CompFreak07

  • Archived User
  • Jr. Member
  • *
  • Posts: 97
Hard Drive, Free And Used Space Display
« Reply #17 on: January 10, 2005, 12:57:00 PM »

I decided I was going to add fan speed in my display.  I also converted C* to F*. Here it is :
CODE

//
// HDD Space.
//
function GetXboxHardDiskStats()
{
var DDPartition;
var nFreeSpace = 0;
var nTotalSpace = 0;
var nArraySize = 4; // Needs to be 4 for everything else to fit
var xboxInfo = " XBOX INFORMATION\r";
var nIntTemp = theConfig.GetInternalTemp();
var nCPUTemp = theConfig.GetCPUTemp();
var nIntTempF = Math.round(nIntTemp * 9/5 + 32);
var nCPUTempF = Math.round(nCPUTemp * 9/5 + 32);
var nROMVersion = theConfig.GetROMVersion();
var nXdashVersion = theConfig.GetXdashVersion();
var sIPAddress = theXboxNetwork.GetXboxIP();
var nFanSpeed = theConfig.GetFanSpeed() * 2;

DDPartition = new Array(nArraySize);

DDPartition[1] = "C:";
DDPartition[2] = "E:";
DDPartition[3] = "F:";
DDPartition[4] = "G:";

for (var i = 1; i < nArraySize + 1; i = i + 1)
{
nFreeSpace = theHardDrive.GetFreeSpace(DDPartition + "\\");
nTotalSpace = theHardDrive.GetTotalSpace(DDPartition + "\\");
if(nTotalSpace != 0){
xboxInfo = xboxInfo + DDPartition + " " + nFreeSpace + "MB of " + nTotalSpace + "MB\r";
}
}
xboxInfo = xboxInfo + "\Fan Speed: " + nFanSpeed + " %\r";
xboxInfo = xboxInfo + "\nK: " + nROMVersion + "\rD: " + nXdashVersion + " IP: " + sIPAddress + "\r"; //Show Dash & Bios Version
xboxInfo = xboxInfo + "MB Temp: " + nIntTempF + " F CPU Temp: " + nCPUTempF + " F\r";
TellUser(theTranslator.Translate(xboxInfo),"");
}
//
// End.
//
Logged

rhythmeister

  • Archived User
  • Newbie
  • *
  • Posts: 4
Hard Drive, Free And Used Space Display
« Reply #18 on: April 06, 2005, 05:12:00 AM »

Are these specifically for the original or comm build? Keeps on freakin out my box, won't boot UIX after putting in the HDD info code  uhh.gif  Any help would be greatly appreciated as I'm not exactly up on coding-I did intro HTML module a few yrs back and that's the height of it!
Logged
Pages: 1 [2]