Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
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.

Risposte (2)

Nagarjuna Manchineni
Nagarjuna Manchineni il 19 Giu 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 Commenti
KJVKU999
KJVKU999 il 20 Giu 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?

Accedi per commentare.


Vladimir Kuptsov
Vladimir Kuptsov il 31 Gen 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.

Categorie

Scopri di più su MATLAB Compiler SDK in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by