MATLAB Answers


How to display 'Loading...' in 'cmd.exe' of a standalone application before it attempts to load MCR?

Asked by KJVKU999 on 15 Jun 2017
Latest activity Commented on by Gil Zimmerman on 4 Nov 2018
Hello, Thank you for your attention.
I deployed an application using deploy tool. I unchecked to suppress console window (similar to 'cmd.exe' in windows 7).
My GUI start time is variable. It's fine. however, I want to display a word 'loading...' at the start of the console window and display another word: 'Loading.... completed' just after my GUI starts.
I have prepared splash image, however it never gets displayed perhaps because console starts immediately after double clicking application file.


Sign in to comment.

1 Answer

Answer by Nagarjuna Manchineni on 19 Jun 2017

I believe you are trying to open an application GUI when you double click the standalone application .exe. For achieving the above behavior, wrap the call to the GUI function inside a function as follows and compile the new function.
function newwrapperfunction
a = <GUI application/function>;
disp('loading completed');


Thank you for your answer. I tried that already, it works but not as intended.
The Problem: Console opens right away when I double click my *.exe file. It displays flashing underscore.
After 120 seconds, i.e. at 121st second, it displayed 'loading'. At 124th second, it displayed 'loading completed'. At 130th second, my GUI opens up.
When I double click *.exe, console should start right away (it does) and it should display 'loading'(at 1st or 2nd second). At 130th second, it should display 'loading completed'. At 131st second my GUI should start.
P.S. I don't know much about when it will load MCR and what other things it must do to start GUI. However, I think that the code I write in MATLAB will not show message in console right away when I start my *.exe, because it needs MCR to be loaded.
Is there a way to display message in console without using MCR, i.e. a script in other language that I can run to show the message, then run *.exe and when GUI opens up, the script will end?
I have a similar question. Any updates on this?

Sign in to comment.