View previous topic :: View next topic |
Author |
Message |
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Jun 13, 2003 9:50 pm Post subject: Different sounds using the BEEP command |
|
|
You can specify a BEEP parameter to tell which kind of beep you would
like. I'm not entirely sure how it works and if the parameters are correct
but in Windows XP Professional with the default sounds theme it seems
to make the four standard beep sounds.
Code: | REM -- Parameters specify sounds --
beep 1
GOSUB WAIT
beep 25
GOSUB WAIT
beep 50
GOSUB WAIT
beep 75
stop
:WAIT
wait 1
exit |
Can people tell me if this works on other computers? Include your
operating system too so we know which ones it works well with. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1563
|
Posted: Fri Jun 13, 2003 10:00 pm Post subject: |
|
|
Worked perfect for me, 4 different sounds. Windows XP Home, VDS 5 |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri Jun 13, 2003 11:07 pm Post subject: |
|
|
Worked on XP Pro
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
Back to top |
|
|
GeoTrail Valued Contributor
Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Sat Jun 14, 2003 12:44 pm Post subject: |
|
|
Hey, if you work on that alittle, you might be the next Idol
[MUSIC]Ding, bang, donk... [/MUSIC] _________________
|
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jun 14, 2003 1:32 pm Post subject: |
|
|
Skit3000 wrote: | I think it should work on each Windows version, because it's using the MessageBeep API. |
But with some people who use different sound themes it could be
different. I just supplied parameters in increments of 25, but others
around there worked too. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
Rebel49 Contributor
Joined: 23 Aug 2002 Posts: 78 Location: Nova Scotia, Canada
|
Posted: Sat Jun 14, 2003 3:13 pm Post subject: |
|
|
Didn't work for me initially but I checked and it was because some
of the sounds in my theme were duplicated so I got repeated sounds
in the VDS test.
Changed the sounds in the control panel and now works fine.
Thanks!
--> Windows 98SE <--
REB. _________________ OLD and eager! |
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Jun 15, 2003 9:29 pm Post subject: |
|
|
These are the constants from Windows.pas which is included with Delphi:
MB_OK = $00000000
MB_ICONASTERISK = $00000040;
MB_ICONEXCLAMATION = $00000030;
MB_ICONHAND = $00000010;
MB_ICONQUESTION = $00000020; |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Jun 15, 2003 11:51 pm Post subject: |
|
|
Thanks Tommy... This works very nicely now!
Code: | rem ** MB_OK = $00000000;
BEEP $00000000
rem ** MB_ICONASTERISK = $00000040;
BEEP $00000040
rem ** MB_ICONEXCLAMATION = $00000030;
BEEP $00000030
rem ** MB_ICONHAND = $00000010;
BEEP $00000010
rem ** MB_ICONQUESTION = $00000020;
BEEP $00000020 |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
GeoTrail Valued Contributor
Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Mon Jun 16, 2003 12:22 am Post subject: |
|
|
BEEP $00000020 don't seem to work here.
I can't hear anything on that one. _________________
|
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Jun 16, 2003 12:54 am Post subject: |
|
|
Make sure you have enough wait time between sounds. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
GeoTrail Valued Contributor
Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Mon Jun 16, 2003 1:21 am Post subject: |
|
|
I put WAIT 1
Is that 1 second or milliseconds? _________________
|
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Mon Jun 16, 2003 12:05 pm Post subject: |
|
|
GeoTrail wrote: | I put WAIT 1
Is that 1 second or milliseconds? |
It's 1 second. If you were to put WAIT 0.1 that would be 100 milliseconds. WAIT 0.05 is
the minimum wait delay if OPTION SLEEPTIME is set to 50 milliseconds, which is the
default. |
|
Back to top |
|
|
|