forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Different sounds using the BEEP command

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Knowledge Base
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Jun 13, 2003 9:50 pm    Post subject: Different sounds using the BEEP command Reply with quote

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. Wink

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1537

PostPosted: Fri Jun 13, 2003 10:00 pm    Post subject: Reply with quote

Worked perfect for me, 4 different sounds. Windows XP Home, VDS 5
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2147
Location: A House

PostPosted: Fri Jun 13, 2003 11:07 pm    Post subject: Reply with quote

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.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Jun 14, 2003 7:35 am    Post subject: Reply with quote

Quote:
Sounds a beep. This command can optionally accept an argument, an integer value corresponding to the constants permitted in the MessageBeep API.

Copyright 1995 - 2002 S.A.D.E. s.a.r.l. / All rights are reserved.


I think it should work on each Windows version, because it's using the MessageBeep API.

Maybe the following commands also work?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/messagebeep.asp

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Sat Jun 14, 2003 12:44 pm    Post subject: Reply with quote

Hey, if you work on that alittle, you might be the next Idol Laughing
[MUSIC]Ding, bang, donk... [/MUSIC]

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Jun 14, 2003 1:32 pm    Post subject: Reply with quote

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. Confused

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Rebel49
Contributor
Contributor


Joined: 23 Aug 2002
Posts: 78
Location: Nova Scotia, Canada

PostPosted: Sat Jun 14, 2003 3:13 pm    Post subject: Reply with quote

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! Smile

--> Windows 98SE <--


REB.

_________________
OLD and eager!
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 737
Location: The Netherlands

PostPosted: Sun Jun 15, 2003 9:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Jun 15, 2003 11:51 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Mon Jun 16, 2003 12:22 am    Post subject: Reply with quote

BEEP $00000020 don't seem to work here.
I can't hear anything on that one.

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jun 16, 2003 12:54 am    Post subject: Reply with quote

Make sure you have enough wait time between sounds. Smile
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Mon Jun 16, 2003 1:21 am    Post subject: Reply with quote

I put WAIT 1
Is that 1 second or milliseconds?

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 737
Location: The Netherlands

PostPosted: Mon Jun 16, 2003 12:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Knowledge Base All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group