But I am now trying to figure out how I would do something like if already have 15 items, then pop item 1 and store last item to item 15. Hopefully, this is understandable.
OR if there is a better way to do this. I am all open to suggestions.
- - Entry of data must be from an Enter or NumpadEnter Hotkey.
- - Must be with Combobox
Code: Select all
#NoEnv
#SingleInstance Force
#Persistent
SetWorkingDir %A_ScriptDir%
SendMode, Input
q::
IniRead, tempVar,save.ini,Values,ItemList
MyArray := StrSplit(tempVar,"|")
Gui, Destroy
Gui, -ToolWindow -SysMenu -Caption AlwaysOnTop
Gui, Add, Combobox, y20 vVar, % tempVar
GuiControl, Text, Var, % MyArray[MyArray.MaxIndex()]
Gui, Show, AutoSize, Test
return
GuiEscape:
Gui, Destroy
return
#IfWinActive, Test
Enter::
NumpadEnter::
Gui, Submit
if (tempVar = "") {
IniWrite, % Var,save.ini,Values,ItemList
return
}
If (InStr(tempVar,"|")) {
IniWrite, % tempVar "|" Var,save.ini,Values,ItemList
} else {
IniWrite, % tempVar "|" Var,save.ini,Values,ItemList
}
return