here is another set of typographic errors:
If (Custom1<>"Undefined" and Custom1<>"") ;if underfined or empty, dont show in Tray Menu
Menu, tray, add, %Custom1%, M1
If (Custom2<>"Undefined" and Custom2<>"")
Menu, tray, add, %Custom2%, M2
If (Custom3<>"Undefined" and Custom3<>"")
Menu, tray, add, %Custom3%, M3
If (Custom4<>"Undefined" and Custom4<>"")
Menu, tray, add, %Custom4%, M4
If (Custom5<>"Undefined" and Custom5<>"")
Menu, tray, add, %Custom5%, M5
If (Custom6<>"Undefined" and Custom6<>"")
Menu, tray, add, %Custom6%, M6
If (Custom7<>"Undefined" and Custom7<>"")
Menu, tray, add, %Custom5%, M7
If (Custom8<>"Undefined" and Custom8<>"")
Menu, tray, add, %Custom6%, M8
Brett forgot to change the last 2 to %Custom7% and %Custom8%.
Save: ;;; ;save and submit to ini from PrefsGui GUI:2
Gui, 2:Submit
IniWrite, %Custom1%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 1
IniWrite, %Custom2%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 2
IniWrite, %Custom3%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 3
IniWrite, %Custom4%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 4
IniWrite, %Custom5%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 5
IniWrite, %Custom6%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 6
IniWrite, %Custom5%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 7
IniWrite, %Custom6%, %A_Scriptdir%\TitleLog Prefs.ini, Custom, 8
IniWrite, %Idletime%, %A_Scriptdir%\TitleLog Prefs.ini, Idletime, 1
IniWrite, %donotlog%, %A_Scriptdir%\TitleLog Prefs.ini, Donotlog, 1
here too.
but lanux128 messaged me to suggest replacing the whole thing with a loop:
Loop, 8 ; since there are only 8 custom msg supported via gui (lanux128)
{
If ((Custom%A_Index%<>"Undefined") And (Custom%A_Index%<>"")) ;if undefined or empty, dont show in Tray Menu
{
Menu, Tray, Add, % Custom%A_Index%, CustomMsg ; change M1-M8 labels into "CustomMsg" (lanux128)
}
}