# How to briefly display message in status area?

The function StatusArea can be used to display stuff in the status area, but only when the user hovers the mouse over the appropriate location.

I want to display a message in the status area for a few seconds, and not requiring the user to hover the mouse anywhere for this to happen.

Basically, I have a function that restarts the kernel (based on one from here); I want it to briefly display a message like "Kernel restarted" in the status area.

• related: 66773 – Kuba Mar 14 '17 at 22:27
• Also related: (26438) – Mr.Wizard Jul 25 '18 at 9:09

Like that?

CurrentValue[EvaluationNotebook[], WindowStatusArea] = "whatever"
Pause[1]
CurrentValue[EvaluationNotebook[], WindowStatusArea] = Inherited


probably something like this will give you more flexibility:

With[
{nb = EvaluationNotebook[]}
, CurrentValue[nb, WindowStatusArea] = "whatever"
; RunScheduledTask[CurrentValue[nb, WindowStatusArea] = Inherited, {1}]
];