here is the problem:
Button-:
Gui, Submit, NoHide
if MyComboBox =
return
SUCECCFULLY DELETE THE ITEM IN THE GUI!
GuiControlGet, Item,,MyComboBox
Control, Delete, %Item%, Combobox1
;ini delete entry
IniDelete, %IniFileName%, Settings, CB ;lösche ganzen eintrag
;catch new list
ControlGet, OutputVar, List, Count Col, ComboBox1
;schreibe neunen eintrag ohne die gelöschte auswahl
IniWrite, %OutputVar%, %IniFileName%, Settings, CB
WRITES INIKEY WITHKOUT THE seperator "|"
thank you
Code: Select all
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#SingleInstance force
SplitPath, A_ScriptName,,,, Name
IniFileName := Name ".ini"
If FileExist(IniFileName) {
IniRead, CB_Liste, %IniFileName%, Settings, CB
IniRead, Auswahl, %IniFileName%, Settings, AW ; letzter Eintrag
}
Gui, +AlwaysOnTop +ToolWindow
Gui, Add, ComboBox, w120 vMyComboBox AltSubmit , %CB_Liste%
GuiControl, ChooseString, MyComboBox, %Auswahl% ; letzte Eintragung anzeigen
;Gui, Add, Button,xp+130 yp-1 w30, +
Gui, Add, Button,xp+130 yp w30 Default, >
Gui, Add, Button,xp+33 yp w30 Default, -
Gui, Show,, % A_Space
Return
Button+:
GuiControlGet, MyComboBox
CB_Liste .= ( CB_Liste ? "|" MyComboBox : MyComboBox )
Sort, CB_Liste, C D| U
IniWrite, %CB_Liste%, %IniFileName%, Settings, CB
IniWrite, %MyComboBox%, %IniFileName%, Settings, AW
GuiControl,, MyComboBox, |%CB_Liste%
GuiControl, ChooseString, MyComboBox, %MyComboBox%
Return
Button>:
gosub, Button+
Gui, Submit, ;NoHide
gosub, pageinput
return
Button-:
Gui, Submit, NoHide
if MyComboBox =
return
GuiControlGet, Item,,MyComboBox
Control, Delete, %Item%, Combobox1
;ini delete entry
IniDelete, %IniFileName%, Settings, CB ;lösche ganzen eintrag
;catch new list
ControlGet, OutputVar, List, Count Col, ComboBox1
;schreibe neunen eintrag ohne die gelöschte auswahl
IniWrite, %OutputVar%, %IniFileName%, Settings, CB
pageinput:
InputBox, UserInput,, Seite:, , 120, 120
if ErrorLevel
return
if MyComboBox = ; wenn combobox leer (keine ini) > return!
return
; NUR ZAHLEN ZULASSEN!
;if USerinput leer > return
else
; in var/clipboard speichern? > falls doc grad nicht aktiv, damit angabe nicht umsonst!?
;MsgBox, (%MyComboBox%: %UserInput%)
Send, (%MyComboBox%: %UserInput%)
return
GuiClose:
ExitApp
Return