From d3b181aefaacfebc68bb40826bc7d2261a29772c Mon Sep 17 00:00:00 2001 From: Yair Altman Date: Sun, 15 Dec 2019 12:42:05 +0200 Subject: [PATCH] Added promo message --- export_fig.m | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/export_fig.m b/export_fig.m index 264473d..968df46 100644 --- a/export_fig.m +++ b/export_fig.m @@ -291,6 +291,7 @@ % 06/08/19: Remove warning message about obsolete JavaFrame in R2019b % 30/10/19: Fixed issue #261: added support for exporting uifigures and uiaxes (thanks to idea by @MarvinILA) % 12/12/19: Added warning in case user requested anti-aliased output on an aliased HG2 figure (issue #292) +% 15/12/19: Added promo message %} if nargout @@ -303,6 +304,22 @@ drawnow; pause(0.05); % this solves timing issues with Java Swing's EDT (http://undocumentedmatlab.com/blog/solving-a-matlab-hang-problem) + % Display promo (just once!) + persistent promo + if isempty(promo) + msg = 'If you need expert assistance with Matlab, consider my professional consulting/training services'; + website = 'https://UndocumentedMatlab.com'; + msg = [msg ' (' website ')']; + if ~isdeployed + link = ['$0']); + msg = regexprep(msg,{'consulting','training'},[link '/$0">$0']); + end + %warning('YMA:findjobj:promo',msg); + disp(['[' 8 msg ']' 8]); + promo = true; + end + % Parse the input arguments fig = get(0, 'CurrentFigure'); [fig, options] = parse_args(nargout, fig, varargin{:});