/* Richard A. DeVenezia * www.devenezia.com * * Presume Splash.exe is in a folder listed * in environment variable PATH ( I put my Splash.exe in %windir% ) * * Splash.exe is found at www.devenezia.com/downloads/splash */ /* * Originally referenced in post made to SAS-L on Dec. 3, 2003 */ %let imagebase = c:\temp\splash; %let imagetype = jpg; %let command = Splash.exe; %let SW_NORMAL = 1; filename sascbtbl catalog 'work.sascbtbl.routines.source'; data _null_; file sascbtbl lrecl=200; input; put _infile_ @; cards4; ROUTINE WinExec minarg=2 maxarg=2 stackpop=called returns=ushort module=Kernel32; arg 1 char input byaddr format=$CSTR200.; * LPCSTR lpCmdLine, // address of command line ; arg 2 num input byvalue format=pib4.; * UINT uCmdShow // window style for new application ; * SW_HIDE 0 ; * SW_SHOWNORMAL 1 ; * SW_NORMAL 1 ; * SW_SHOWMINIMIZED 2 ; * SW_SHOWMAXIMIZED 3 ; * SW_MAXIMIZE 3 ; * SW_SHOWNOACTIVATE 4 ; * SW_SHOW 5 ; * SW_MINIMIZE 6 ; * SW_SHOWMINNOACTIVE 7 ; * SW_SHOWNA 8 ; * SW_RESTORE 9 ; * SW_SHOWDEFAULT 10 ; * SW_MAX 10 ; ;;;; run; %macro countdown_images(ImageType=jpg, base=); %* ImageType = jpg | gif | png | bmp; %let jpgDriver = jpeg; %let gifDriver = gif; %let pngDriver = png; %let bmpDriver = bmp; %local N; goptions reset=all; %do N = 1 %to 10; %let splashFile = &base.&N..&ImageType; filename splash "&splashFile"; goptions gaccess=sasgastd gsfname=splash device=&&&ImageType.Driver; goptions ftext='Arial' htext=72pt vsize=3.5in hsize=3.5in goutmode=replace; proc gslide frame gout=work.splash name="screen"; note ' '; note j=c "&N...."; run; quit; %end; filename splash; %mend; * generate a series of images; %countdown_images(base=&imagebase); * and play them back; %let rc = %sysfunc (ModuleN (WinExec, &command &imagebase.10.jpg , &SW_NORMAL.)); data _null_;do i = 1to 1e8;end;run; %let rc = %sysfunc (ModuleN (WinExec, &command &imagebase.9.jpg , &SW_NORMAL.)); data _null_;do i = 1to 1e8;end;run; %let rc = %sysfunc (ModuleN (WinExec, &command &imagebase.8.jpg , &SW_NORMAL.)); data _null_;do i = 1to 1e8;end;run; %let rc = %sysfunc (ModuleN (WinExec, &command &imagebase.7.jpg , &SW_NORMAL.)); data _null_;do i = 1to 1e8;end;run; %let rc = %sysfunc (ModuleN (WinExec, &command &imagebase.6.jpg , &SW_NORMAL.)); data _null_;do i = 1to 1e8;end;run; %let rc = %sysfunc (ModuleN (WinExec, &command &imagebase.5.jpg , &SW_NORMAL.)); data _null_;do i = 1to 1e8;end;run; %let rc = %sysfunc (ModuleN (WinExec, &command &imagebase.4.jpg , &SW_NORMAL.)); data _null_;do i = 1to 1e8;end;run; %let rc = %sysfunc (ModuleN (WinExec, &command &imagebase.3.jpg , &SW_NORMAL.)); data _null_;do i = 1to 1e8;end;run; %let rc = %sysfunc (ModuleN (WinExec, &command &imagebase.2.jpg , &SW_NORMAL.)); data _null_;do i = 1to 1e8;end;run; %let rc = %sysfunc (ModuleN (WinExec, &command &imagebase.1.jpg , &SW_NORMAL.));