# How to make the Mathematica icon flash in the taskbar?

I have a somewhat long computation running in the background. I would like the Mathematica icon on the taskbar to flash once the computation is done. For example, Microsoft Outlook reminders make the taskbar flash:

How can I achieve the same effect in Mathematica? Is there a Mathematica command that makes the Mathematica icon in the taskbar flash?

What I've tried: Beep[] can be useful, but if you leave the computer for a while, you can miss the beep. The advantage of flashing is that it remains flashing indefinitely. Another alternative is MessageDialog[], but you have no way of knowing that a message is up if Mathematica is minimized. It would be useful if MessageDialog[] produced the flashing in the taskbar, but that doesn't happen.

-
I don't think there are some commands that make the icon flash, but I usually add Beep[] at the end of code if it will take long time to compute. – mm.Jang Jan 14 '14 at 16:20
@mm.Jang The problem with Beep[] is that if you leave the computer for a while and return, and you can miss the beep. The icon flashing remains flashing indefinitely. – becko Jan 14 '14 at 16:25
This is OS dependent and not specific to Mathematica. You might have better luck on Super User. If you're trying to set up a notification when the computation is finished, then you can perhaps use my answer here: Automatic e-mail/text message when a calculation has finished? – R. M. Jan 14 '14 at 16:33
I'm running Mac OS X and if Mathematica is hidden then using SystemDialogInput["FileSave"] makes the Dock icon bounce. Perhaps under Windows it will flash the Taskbar icon? – MikeLimaOscar Jan 14 '14 at 17:06
@becko What rm-rf meant (I believe) is that since Mathematica does not contain built-in functionality for this, the question would be the very same for any other software: how do you make the taskbar button of a particular program flash? Not meaning to say that this should be closed here (it would be very useful to have what you're asking for), but you are indeed more likely to get an answer on superuser.com. – Szabolcs Jan 14 '14 at 19:09

This is perhaps not a completely satisfactory solution but it is Mathematica based.

Unlike MessageDialog[]

SystemDialogInput["FileSave"]


will make the Taskbar icon flash in Windows and the Dock icon bounce in Mac OS X under certain conditions. (I believe the document must be minimised in Windows or hidden in Mac.)

Of course it has the slight side-effect of bringing up a file selection dialog but this could be used to ensure that the results of your long computations are saved to a file, e.g.

result = MyLongComputation[];
Export[SystemDialogInput["FileSave", WindowTitle -> "Computation Complete"], result]


Using the WindowTitle option should also make the sudden appearance of the dialog box less likely to be confusing.

-
+1 Good idea. Converting the file selection dialog into something useful makes sense. – becko Jan 15 '14 at 14:41