Kelp,

So - as Allen pointed out, the built-in ReadProfileString has some pretty useful capabilities.
 Code:
$List = ReadProfileString('inifile.ini', 'Xerox 6600')
will load all of the values into a list, delimited with @CRLF. Performing a
 Code:
$aList = Split($List, @CRLF)
will convert this to an array. The UDF EnumIni() will do this for you, btw.

So - to find out how many parameters you have:
 Code:
$Params = UBound($aList)
You can also enumerate this with "for each $V in $Array". Note that this returns the VALUES that exist in the section, and enumerating them will return "Black", "Cyan", "Magenta", and "Yellow". Here's the bigger picture:
 Code:
$PModel = 'Xerox 6600'
; Get the supported toner colors
$aColors = Split(ReadProfileString('PrinterData.ini', $PModel), @CRLF)
For Each $Color in $aColors
  ; message for debugging
  'Processing toner color: ' $Color @CRLF
  $Oid = ReadProfileString('PrinterData.ini', $PModel, $Color)
  $Cmd = 'snmpget.exe ' + $PrinterIP + ' ' + $Oid
  $CmdResult = WshPipe($Cmd)
  ; do the magic with the returned data here..
  ;
  ; then process the next toner color (if any)
Next
Look at EnumIni() as well to simplify repeated execution of INI queries. The other function that Allen referenced is IniArray, which loads an entire INI file into an array and allows manipulation with functions similar to Read/WriteProfileString. If you find yourself doing lots of INI reads, this can improve performance, but I'd start with the basic Read and Write ProfileString commands.

Glenn

Hey Allen - when the hell did "built-in" become "inbuilt"? \:D
_________________________
Actually I am a Rocket Scientist! \:D