home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. CD ROM (Annual Premium Edition)
/
premium.zip
/
premium
/
WINUTIL2
/
WBT31C.ZIP
/
INIEDIT.WB$
< prev
next >
Wrap
Text File
|
1992-02-26
|
2KB
|
87 lines
CR=strcat(Num2char(13),Num2char(10))
TAB=Num2Char(9)
DirChange(DirWindows(0))
canned="BYEBYE"
IniFiles=""
:UP1
canned="byebye"
If IniFiles!="" then goto inied
IniFiles=FileItemize("*.INI")
:inied
TheFile=ItemSelect("Choose Desired INI file",IniFiles," ")
if TheFile=="" then goto newini
Sections=""
:UP2
canned="up1"
if Sections!="" then goto sected
Sections=IniItemizePvt("",TheFile)
:SECTED
Section=ItemSelect("%TheFile% - Choose Section",Sections,TAB)
if Section=="" then goto AddSect
KeyValues=""
:UP3
canned="up2"
if KeyValues!="" then goto looped
Keys=IniItemizePvt(Section,TheFile)
KeyMax=ItemCount(Keys,TAB)
KeyIndex=0
:Loop
if KeyIndex==KeyMax then goto looped
KeyIndex=KeyIndex+1
ThisKey=ItemExtract(KeyIndex,Keys,TAB)
ThisValue=IniReadPvt(Section,ThisKey,"???",TheFile)
KeyValues=strcat(KeyValues,ThisKey,"= ",ThisValue,TAB)
goto Loop
:looped
Key=ItemSelect("%TheFile% [%Section%] - Choose Keyword",KeyValues,TAB)
if Key=="" then goto AddKey
Key=ItemExtract(1,Key,"=")
Value=IniReadPvt(Section,Key,"???",TheFile)
goto entkey
:newini
canned="UP1"
TheFile=Askline("Making NEW INI file","Enter new INI file name","*.INI")
if (TheFile=="*.INI" || TheFile=="") then goto newini
IniFIles=""
goto AddSectNewIni
:AddSect
canned="up2"
:AddSectNewIni
Section=AskLine("Add New Section to INI File","Enter new section name for%CR% %TheFile%%CR% [?????]","")
Sections=""
goto AddKeyNewSect
:AddKey
canned="up3"
:AddKeyNewSect
Key=AskLine("Add New Keyword to INI File","Enter new key name for%CR% %TheFile%%CR% [%Section%]","")
Value="(Undefined)"
KeyValues=""
goto EntKeyNewKey
:ENTKEY
canned="up3"
:EntKeyNewkey
NewValue=AskLine("Modify INI File Keyword","%TheFile%%CR% [%Section%]%CR% %Key% = %Value%",Value)
if NewValue!=Value then iniwritepvt(Section,Key,NewValue,TheFile)
KeyValues=""
goto up3
:CANCEL
goto %Canned%
:BYEBYE
exit