alias quit {
if ($1-) .set %quitmsg $1- | /quit %quitmsg %script | .unset %quitmsg
else quit $iif(%quitmsg,$v1,%script)
}
;------------

I think this is the right code?

What about when i just click the quit on the menu?
and do not type the /quit