Matlab: Splash screen for Matlab Standalone applicationsСуббота, 10 января 2015 г.
With Matlab deployment tool one can create Matlab Standalone applications, which can be executed without Matlab (only Matlab runtime library needed). Launching Matlab Standalone application requires some time (about several seconds for the first run). In the meantime Matlab does not show any signals, that the Standalone is loading. So some time user can not understand, what's happening: whether the standalone is starting or not. More info about this problem can be found here. There is a solution - splash screen, auxiliary popup window, that is created without Matlab, that is waiting for loading Matlab standalone and can display some progress information. This solution from Yair Altman is not free. Here you can find a free solution written with Autoit3.
SplashScreenApp programThe idea of a auxiliary program SplashScreenApp is taken from Yair Altman Splash window for deployed applications. We create a program, that will do following things
- Run main Matlab standalone application.
- Show popup window, that will display some information to user
- The spash-screen window will be waiting and searching for the Matlab standalone window. When the Matlab Standalone window is found, the splash application is closed.
It is very simple to write programms in AutoIt3 (specially with the existed solution for gif-animation GIFAnimation.au3 from trancexx GIF in AutoIt). That is why the features of SplashScreenApp duplicate all the features of Yair Altman solution, and the are some new features:
- settings of SplashScreenApp are inside ini-file (new),
- you can choose the size of the SplashScreenApp popup window,
- you can choose the background image of SplashScreenApp,
- you can choose gif-file with loading-loop animation (new),
- you can create arbitrary message, that will be displayed in the SplashScreenApp window (new)
SplashScreenApp.exe "PathToConfigIni" "Param1" Param2"
SplashScreenApp.exe reads settings from the default config file splash_config.ini, that must be in the current directory
SplashScreenApp.exe "PathToConfigIni" reads settings from the config file with full path PathToConfigInipath
SplashScreenApp.exe "PathToConfigIni" "Param1" Param2" the settings are taken from the file with filepath PathToConfigInipath, parameters Param1 and Param2 are transfered to the main Matlab Standalone
SplashScreenApp SettingsBy default the config-file of the SplashScreenApp.exe splash_config.ini must be in the current directory. All program settings are separeted into the following 3 sections inside ini-file.
[Application] section - Main Matlab Standalone settings
Contains the fullpath in quotes "" to the main Matlab Standalone
Contains the string in quotes "" with the Title of the Matlab Stanalone window. SplashScreenApp will be searching for this string in the title of all windows. The searching mentod is defined by the parameter [Options]-WinTitleMatchMode
- gui_width and gui_height
Sets the sizes of the SplashScreenApp popup window. The background image will be scaled for the new size of the window. This parameters can be omitted (you can comment this lines). By default the size of the SplashScreenApp windows is equal to the size of the background image.
Fullpath to the background image. Formats gif, png, bmp, jpg are supported. For the image with transparency it is better to use gif-file.
Fullpath to the loading-loop file. If loading_loop_path= , the progressbar will be not shown. You can set sizes of the progressbar and it's left/right alignment (keys loop_width, loop_height, loop_left_shift (shift from left border), loop_right_shift (shift from right border), units - pixels)
The information-string in the bottom of the popup-window
For example, info_str="Please, wait...\nApplication is loading"
Symbol \n denotes the new-line symbol.
The setting of the information-string are regulated with the following parameters (can be omitted):
info_str_clr (color), info_str_fontname (font), info_str_fontsize (font size), info_str_fontweight (font style), info_str_fontattribute (italic, underline), info_str_alignment (alignment), info_string_shift (shift of the string relative to the progressbar), info_string_left_shift (left shift), info_string_right_shift (right shift).
Shift of the progress bar from the bottom border of the window.
The method for searching for matching of exe_fig_title and title string.
1 = Match the title from the start
2 = Match any substring in the title
3 = Exact title match
-1 to -3 = Case insensitive match according to the other type of match.
Time in seconds, after which the SplashScreenApp notification message will be closed (by default 10 seconds)
Time in seconds, during which SplashScreenApp will search for the Matlab Standalone application. If during this time the StandAlone window will be not found, then SplashScreenApp will display a notification message.
- You can create different shortcuts for SplashScreenApp with different settings for the Matlab StandAlone.
- You can distribute SplashScreenApp.exe together with the Matlab Standalone; you can rename SplashScreenApp.exe.
- If you want to change SplashScreenApp.exe icon, you need recompile source AutoIt3-files with Aut2exe.
- Loading-loop file can be created with the online-tool http://ajaxload.info.
- Background image for the SplashScreenApp can be created with PowerPoint.
- With AutoIt3 Aut2Exe you can change SplashScreenApp.exe icon (free icons can be found on https://www.iconfinder.com)
- SplashScreenApp can be used not only for Matlab applications
Source files SplashScreenApp, AutoIt3
- Полезный Софт. Универсальная консоль TypeAndRun под Windows
- Autocad: автоматическая печать из модели с поддержкой 2 принтеров и автоматический выбор ориентации в PDF
- ПО Rastrwin: макрос загрузки комплекта файлов в программу
- ПО Rastrwin: макрос загрузки файла с определением шаблона по типу файла
- ПО Rastrwin: комплекс OpenSaveD для работы с комплектами рабочих файлов
- Добавление программ в меню "Открыть с помощью"
- ПО Rastrwin: макрос пакетного удаления метки Отмечено (Sel)