View discussion [37 posts] | View script | License | Download documentation as: HTML or editable |
Download script | History | Other scripts by: sunanda |
17-Sep 4:37 UTC
[0.054] 11.411k
[0.054] 11.411k
Documentation for: parse-ini.rWindows INI file parserSunanda October 2003 Contents1. OverviewA Windows ini file has this structure: [section-name1] keyword1=somevalue keyword2=someothervalue [section-name2] keyword3=yetanothervalue There may be many sections, and each will have zero or more keywords. The two functions in this script are: 1.1 parse-ini-fileTakes a whole ini file and converts it to a REBOL hash structure: ["section-name" ["keyword1" "somevalue" "keyword2" ...] ...] 1.2 find-in-iniReturn a value from an ini file. Returns false if the section and keyword do not exist. 1.3 Examplesini: parse-ini-file %/c/windows/win.ini print find-in-ini ini "ports" "com1:" print find-in-ini ini "intl" "iCountry" print find-in-ini ini "truetype" "FontSmoothing" print find-in-ini ini "xxx" "xxxx" Notes
|