Jump to content

How to beep usnig PC Speaker, not sound card.


Recommended Posts

When the headset is plugged in, you cannot hear warning sounds when  headset is not near the ears.

Therefore I want to use the PC speaker.

Found a solution here, but it does not produce any beep on my WIN 8.1 X64 System.
Speaker is installed. I can hear one beep at POST time.

Here the code:

;  Include files may be found here: https://www.autoitscript.com/forum/topic/121084-io-port-functions



#include "IOFunctions\[Includes]\_IOBeep.au3"
; ===============================================================================================================================
; <IOBeepExample.au3>
;
; Example use of _IOFunction's _IOBeep.au3 - Sends a Beep to the PC speaker.
;
; Reference:
;   See trancexx's post:
;       'CMOS' Beep: http://www.autoitscript.com/forum/index.php?showtopic=106878&view=findpost&p=754720
;
; Author: Ascend4nt, trancexx for the _Beep() function
; ===============================================================================================================================


; ===================================================================================================================
;   MAIN CODE
; ===================================================================================================================

If Not _IO_Initialize() Then Exit _
    MsgBox(48,"DLL or IO Driver failed to load","DLL or IO Driver failed to load, possibly due to an install issue."&@CRLF& _
        "If this is the first time using the DLL/Driver, please run the driver install."&@CRLF&"(Either IOInstallx86 or IOInstallx64)")

_IO_Beep(440,5000)

; Unload the DLL
_IO_UnInitialize()

This code is from Ascend4nt and Trancexx
And there codes are known as superior.

So, where is my fault?

TIA Exit

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...