Thanks all - I'm still working on it. Hopefully I can get other problems solved.
ptrex - I think I know what cause the 1st script to fail for you. I
Assumed that an Attribute would be present in the first set of the array. I changed an IF Statement from ExitLoop to ContinueLoop, but not for your particular instance. Looks like That fixed more than one problem!
Also, I ran this on the Win7 64Bit Machine earlier And I found out that #RequireAdmin was needed to make it work on that one. You could always use "Run As Administrator" also.
---
Thought I would share this from testing that I did on an older drive. It should give you some idea of how to interpret the data.
Remember, that just because the data is This Way for This Drive, doesn't mean that the next drive will be the same way.
But... I think for this Attribute (9=POH), it's pretty much a standard (as are a few others, ie: Temperature).
This is how a Western Digital 80GB Drive would appear if it was somewhat new.
(Columns 3 and 4 have the same exact data on This Drive)
Starting at column 3 on the array...
100|100|96|0|0|0|0|0|0|PowerOnHours(POH)
| | | |
| | | Total Cycles -or- Turnovers
| | Hours Count (this cycle)
The Percentage from 100 remaining on the drive
Now, some years go by and this is the result...
43|43|142|163|0|0|0|0|0|PowerOnHours(POH)
| | | |
| | | Total Cycles -or- Turnovers
| | Hours Count (this cycle)
The Percentage from 100 remaining on the drive
One could easily make a script like this, to reflect the Lifetime Remaining on a hard drive...
Local $Value = 43
GUICreate('HardDrive - Lifetime Remaining from POH', 350, 100, -1, -1)
GUICtrlCreateLabel($Value & '%', 36, 37, 20, 20)
Local $pb = GUICtrlCreateProgress(65, 35, 200, 20)
GUICtrlSetData($pb, $Value)
GUISetState()
Do
Until GUIGetMsg() = -3
GUIDelete()
Of course, you would get the $Value from the array at column 3 or 4 at Attribute 9.
ie: Local $Value = $aSMART[9][4]
So, If I'm reading this properly, then on this drive, the overall data in those columns would be like this:
0 = Old Age (lifetime reached) - "43" would eventually fall to zero, right?
1 = Error Flag - this would be the alert.
100 = Start Percentage Value - eventually falling over time.
200 = OK or N/A (not applicable) or Other - is the way it appears to me. Correct me, if I'm wrong.
The rest would be in threshold or data columns.
It seems that Cycles or Turnovers are at the end of 255 which carries over to the "Cycles" column as one cycle and Then starts over. I'll have to confirm all this as time goes by.
Good day all.
I'm pretty sure this script has "some flaws" (somewhere). Welcome to programming!