3

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 2

7

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
3
  • 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
  • @SPRajagopal new approach added.
    – John
    Commented Jun 4, 2013 at 17:16
  • 1
    It's better if you set textToSpeak to 'What is thy bidding my master'. Commented Jun 4, 2013 at 17:45
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.