INI Files
#13
(03-07-2011, 12:04 AM)Tim Wrote: Sorry im bumping an old thread but thought it would be silly to make a new one Smile

Is there a way to cycle through all the keys in an ini file and output the key name and the values within it?

Sample code:
PHP Code:
for keyID 0,IniFile:GetNumKeys()-do
  for 
valID 0,IniFile:GetNumValues(keyID)-do
    
Log("keyID = " .. keyID .. ", valID = " .. valID .. ", " .. IniFile:GetValue(keyIDvalID))
    
Log("keyName = " .. IniFile:GetKeyName(keyID))
    
Log("valName = " .. IniFile:GetValueName(keyIDvalID))
  
end
end 
Reply
Thanks given by:


Messages In This Thread
INI Files - by Tim - 02-27-2011, 09:16 AM
RE: INI Files - by Tybor - 02-27-2011, 05:41 PM
RE: INI Files - by FakeTruth - 02-27-2011, 11:22 PM
RE: INI Files - by Tim - 02-28-2011, 01:18 AM
RE: INI Files - by FakeTruth - 02-28-2011, 03:13 AM
RE: INI Files - by codename_B - 02-28-2011, 06:46 AM
RE: INI Files - by Tybor - 02-28-2011, 06:50 AM
RE: INI Files - by Tim - 02-28-2011, 09:02 PM
RE: INI Files - by Tybor - 03-01-2011, 02:49 AM
RE: INI Files - by codename_B - 02-28-2011, 10:06 PM
RE: INI Files - by Tim - 03-07-2011, 12:04 AM
RE: INI Files - by Tybor - 03-07-2011, 03:37 AM
RE: INI Files - by FakeTruth - 03-07-2011, 02:03 AM
RE: INI Files - by Tim - 03-07-2011, 04:35 AM
RE: INI Files - by Tim - 03-07-2011, 06:48 AM



Users browsing this thread: 6 Guest(s)