set SWITCHES_ID to "{"
repeat with i from 1 to number of items in SWITCHES_LIST
set this_item to item i of SWITCHES_LIST
if SWITCHES_ID is not equal to "{" then set SWITCHES_ID to SWITCHES_ID & ", "
set SWITCHES_ID to SWITCHES_ID & this_item & ": " & switch's active(this_item)
if this_item as text is equal to "-" then
set thisMenuItem to (current application's NSMenuItem's separatorItem())
else
if switch's active(this_item) then set this_item to this_item & " " & emoji's CHECK
set thisMenuItem to (current application's NSMenuItem's alloc()'s initWithTitle:this_item action:("menuToggler:") keyEquivalent:"")
end if
(newMenu's addItem:thisMenuItem)
(thisMenuItem's setTarget:me)
end repeat
set SWITCHES_ID to SWITCHES_ID & "}"