Date: Fri, 24 Mar 2000 14:21:27 -0800
Reply-To: Walter.Smetsers@eomdata.nl
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Walter Smetsers <Walter.Smetsers@EOMDATA.NL>
Subject: Re: DDL Calls
In-Reply-To: <38DB5D86.66D484F3@ica.net.au>
Content-Type: text/plain; charset="iso-8859-1"
Colin,
Try this code to get a Beep from your PC (windows). Works fine for
me, maybe there's a error in your SASCBTBL-file. (I think the comma
at the end of ARG 2 in your SASCBTBL-file needs to be a dot.)
Have luck/fun with the code.
Greetings,
Walter Smetsers
EOM Data
http://www.eomdata.nl
/* Code to get a windows message BEEP depending on your WIN.INI file */
* *;
* MessageBeep - The MessageBeep function plays a waveform sound. The *;
* waveform sound for each sound type is identified by an *;
* entry in the [sounds] section of the registry/WIN.INI. *;
* *;
* CALL MODULE("MessageBeep", *;
* NUM BeepType // sound type (see below) *;
* ); *;
* *;
* NOTE: BeepType codes: -1=PC Speaker, 0=Default, 16,32,48,64=Others *;
* *;
FILENAME SASCBTBL CATALOG "work.temp.attrfile.source";
DATA _NULL_;
FILE SASCBTBL;
PUT "ROUTINE MessageBoxA";
PUT " MINARG=4";
PUT " MAXARG=4";
PUT " STACKPOP=CALLED";
PUT " MODULE=USER32";
PUT " RETURNS=LONG;";
PUT " ARG 1 NUM BYVALUE FORMAT=PIB4.;";
PUT " ARG 2 CHAR FORMAT=$CSTR200.;";
PUT " ARG 3 CHAR FORMAT=$CSTR200.;";
PUT " ARG 4 NUM BYVALUE FORMAT=PIB4.;";
put "ROUTINE MessageBeep" ;
put " MODULE=USER32";
put " MINARG=1" ;
put " MAXARG=1" ;
put " STACKPOP=CALLED;" ;
put " ARG 1 NUM INPUT BYVALUE FORMAT=PIB4.;";
RUN;
options nonotes nosource;
DATA _NULL_;
msg = "The time is now " || put(time(),time.) || "0A"x ||
"The date is " || left(put(today(),nlddfwdx.)) || "0A"x ||
"Your using version " || left("&sysvlong") || " of the SAS system.
" || "0A"x ||
" " || "0A"x ||
left("Have luck with the BEEP");
response = MODULEN("MessageBoxA", 0,
msg,
"HELLO THERE !!!!",
0 + 64 + 512);
CALL MODULE("MessageBeep",
0) ;
RUN;