Code:
Func saveCustomKeys()
$string = GUICtrlRead($etlootCustom)
If Not $string = "" Then
$temp = StringReplace($string, @CRLF, " ")
$temp = StringStripWS($temp, 7)
$arr = StringSplit($temp, " ")
For $a = 1 To $arr[0]
$tempLoc = StringSplit($arr[$a],"|")
If FileExists(@ScriptDir & "\pics\" & $tempLoc[1] & ".png") Then
IniWrite($settingsINI, "Custom Items", "Key" & $a , $arr[$a])
EndIf
Next
Return 1
Else
Return @error
EndIf
EndFunc
Func getCustomKeys()
Local $pick[1]
$string = ""
$var = IniReadSection($settingsINI, "Custom Items")
If Not @error Then
$totalItems = $var[0][0]
If $totalItems > 0 Then
ReDim $pick[$totalItems]
EndIf
For $a = 1 To $totalItems
$pick[$a-1] = $var[$a][1]
$string &= $pick[$a-1] & @CRLF
Next
Else
$totalItems = 0
EndIf
GUICtrlSetData($etlootCustom, $string)
EndFunc
Originally Posted by
KevinKoh
nevermind mistake