Emnico in Swindon and its partners
in the UK and Europe provide:

» IT Support Services and Products
» Bespoke Software Development


Contact our Swindon office on:
+44 (0)1793 614 700
to discuss your IT needs.


CLOSE IT
Emnico Logo
Your Virtual Technology Team
Delivering Peak Performance
Category: Type: Order:
Search For:  
Home > Library > Beep

Beep

This script will cause the computer to beep seven times so that you are able to physically locate a machine.
Added 338 days ago by Emnico
Download
Review
Back
231Views
This script has been successfully tested by Emnico and is verified to be working.

Source code

beep("7")
    '#--------------------------------------------------------------------------
    '#  FUNCTION.......:  beep()
    '#  ARGUMENTS......:  iTimes = the number of times the computer will beep.
    '#  PURPOSE........:  Causes the computer's internal speaker to beep. On 
    '#                    some systems the beep will be executed from the actual
    '#                    speakers.
    '#  EXAMPLE........:  beep("7")
    '#  NOTES..........:  This was surprisingly hard to figure out, yet highly
    '#                    useful. There is a timing issue, the script will
    '#                    execute the beeps faster than the speaker can make
    '#                    individual noises.
    '#--------------------------------------------------------------------------
    Function beep(iTimes)
        Set oShell = CreateObject("Wscript.Shell")
        Dim iTemp
        For iTemp = 1 To iTimes
            oShell.Run "%comspec% /c echo " & Chr(7), 0, False
            Wscript.Sleep 300
        Next
    End Function

User Reviews

Recommended by Emnico 
by Emnico on 16 November 2009
This script is very useful if you have multiple computers and you need to correlate a computer's name or IP address with the physical box. Sound is generated by the computer's internal speaker, rather than the audio card, so this script works even when the audio is muted.


| Privacy policy | Environmental policy | Site map |