Query active menu item: I need to know whether a certain menu item is active. Is this possible?

Yes; here is a sample coding:

GetFieldAttribute M[Change] protected=prot

if V[prot=X]

  // menu item "Change" is active

endif