Hi, long time no post!
so basically I have a listbox that I want to populate with hard drive letters (type 3) and then when i select a listbox entry i want it to display details in labels, such as disk label, total size, partitions etc..
So far I have it hard coded that the disk to show info on (C
but I cannot figure out all the for's, if's & then's.
Code I have so far (this part is the hard coded drive letter)
sDriveSize = Drive.GetSize("C:");
cGBspace=sDriveSize/1024
csNewFreeSpace = String.Left(cGBspace, 5);
Label.SetText("LabelDiskSize", csNewFreeSpace.." GB Total Capacity");
This next bit successfully loads the drive letters into the listbox, but I am stuck with the on click specifics (again for, if & then's!)
drives = Drive.Enumerate();
for j,k in pairs (drives) do
drive_type = Drive.GetType (k)
if drive_type == 3 then
result = ListBox.AddItem("ListDrives", k .. "", "");
end
end
If I cannot do it this way through AMS, is there any commands I can type in command prompt and then pipe the results to a file for manipulation?
Thanks for your time.
Arty.
so basically I have a listbox that I want to populate with hard drive letters (type 3) and then when i select a listbox entry i want it to display details in labels, such as disk label, total size, partitions etc..
So far I have it hard coded that the disk to show info on (C

Code I have so far (this part is the hard coded drive letter)
sDriveSize = Drive.GetSize("C:");
cGBspace=sDriveSize/1024
csNewFreeSpace = String.Left(cGBspace, 5);
Label.SetText("LabelDiskSize", csNewFreeSpace.." GB Total Capacity");
This next bit successfully loads the drive letters into the listbox, but I am stuck with the on click specifics (again for, if & then's!)
drives = Drive.Enumerate();
for j,k in pairs (drives) do
drive_type = Drive.GetType (k)
if drive_type == 3 then
result = ListBox.AddItem("ListDrives", k .. "", "");
end
end
If I cannot do it this way through AMS, is there any commands I can type in command prompt and then pipe the results to a file for manipulation?
Thanks for your time.
Arty.
Comment