Is there a way to set matlab to come to the foreground of the windows when the command in complete? I can see it happening by executing a dos() but I'm unaware how window management works? Maybe there is a better way? Someone?
2 Answers
Two options. Neither exactly what you are asking for.
Option 1: Open a new figure.
figure();
imagesc(processingDoneSplashImage);
If you want to get fancy, put this in a script, with a timer, and flash the image between bright green, and bright red....
Option 2: My solution to your problem. (I find popping up windows extremely annoying.) I put this function call at the end of my long running scripts, and the computer tells me when it's done processing....
function [ ] = matSpeak( textToSpeak )
%matSpeak takes some text, and outputs onto the speaker the text,
% using the .Net SpeechSynthesizer.
% This only works on Windoze.
if ~exist('textToSpeak','var')
textToSpeak = 'Your processing has completed.';
end
NET.addAssembly('System.Speech');
speak = System.Speech.Synthesis.SpeechSynthesizer;
speak.Volume = 100;
speak.Speak(textToSpeak);
end
-
Yeah I thought of audible gongs but the problem is I need visual cues. Lab systems don't have a speaker and I don't to put in an earphone just to hear the signal go. But yeah this is a pretty nice solution for a different situation, I guess. +1 Commented Jun 4, 2013 at 17:05
-
-
1It's better if you set
textToSpeak
to 'What is thy bidding my master'. Commented Jun 4, 2013 at 17:45
Why not just use Growl for your notification windows?
cmd = ['/usr/local/bin/growlnotify -m ' messagestr];
system(cmd);
Of course with Windows you need to fix the path to the growlnotify
binary.
- Source: http://www.mathworks.com/matlabcentral/newsreader/view_thread/259142
- A wrapper with lots of features: Send a notification to Growl on MATLAB Exchange
- Many more examples: https://www.google.com/search?q=growl+matlab