Browse the docs

mailFlag

Returns the colour flag index of the selected message.

Keyboard Maestro: MAILFLAG

Details #

mailFlag() takes no arguments and returns a number: the colour flag index of the selected message.

Parameters #

Takes 0 arguments. {{ mailFlag() }}

Examples #

mailFlag()
→ 0

Gotchas #

  • Needs Automation permission for Mail. It reads the first selected message in Mail; when Mail isn't running, nothing is selected or Mail doesn't answer within about 5 seconds, the answer is 0.

  • The number is Mail's own flag index for the message.

  • Takes no arguments.