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

1 view (last 30 days)
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.

Answers (2)

Nagarjuna Manchineni
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
disp('loading');
a = <GUI application/function>;
disp('loading completed');
end
  2 Comments
KJVKU999
KJVKU999 on 20 Jun 2017
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.
Requirement:
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?

Sign in to comment.


Vladimir Kuptsov
Vladimir Kuptsov on 31 Jan 2020
Just create a simple bat-file with two lines:
@echo loading...
@MyApp.exe
MyApp.exe - your standalone application. Use disp('loading completed') from Matlab code for the second message.
Now use this bat-file to start your application.

Categories

Find more on MATLAB Compiler SDK in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!