Creating Shortcut for Matlab app (mlapp)
    12 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    John Murphy
 el 8 de Mzo. de 2022
  
Is there a way to create a desktop shortcut to run a GUI created with the Matlab App designer (.mlapp file)?
0 comentarios
Respuesta aceptada
  Eric Delgado
      
 el 19 de Sept. de 2022
        No. You have to compile it. And then, during the installation process of your app, you could choose to create a desktop shortcut for your app.
Más respuestas (1)
  jon
 el 15 de Oct. de 2024
        
      Editada: jon
 el 15 de Oct. de 2024
  
      Yes, It is possible. Lets assume you have a matlab app called MyApp.
Open notepad, write the following, then save as a .bat file. Make a desktop shortcut to your bat file (or just put the bat file on the desktop i guess)
:: echo off will stop the window temrinal from showing up
@echo off
:: if matlab already open then kill it
TASKLIST | FINDSTR MATLAB && TASKKILL /IM MATLAB.exe /F
:: then open the script, minimise the main page, dont show the splash screen, and i forgot what the -r option means
matlab -minimize -nosplash -r "MyApp"
To take this one step further, I downloaded SplashScreen from FEX (https://uk.mathworks.com/matlabcentral/fileexchange/30508-splashscreen), and wrote a matlab script which opens a splash screen then starts the app. In this case I change the BAT file to open this matlab script instead of opening the app directly. 
s = SplashScreen('Starting LAPS','laps_sicm_logo.png'); % show my custom splash screen
MyApp; % start MyApp
s.Visible = 'off'; % i dont remember why i turn this off then on, maybe it brings the window to the front?
s.Visible = 'on';
delete(s); % remove the splash screen once the app has started
Therefore, in this more complicated scenario, the BAT file will:
1- check if matlab is already open, and if so it will close it to avoid multiple instances
2- open Matlab with the main window minimised
3- show a custom splash screen
4- open my desired app
0 comentarios
Ver también
Categorías
				Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

