Can I have Win 10 make a native beep?

Page 2 of 2 FirstFirst 12

  1. Posts : 5,048
    Windows 10/11 Pro x64, Various Linux Builds, Networking, Storage, Cybersecurity Specialty.
       #11

    Robben said:
    Cool! But for my particular purpose it takes too long.

    BTW, to not have the Command Prompt window shown, I'm calling the .bat from this .vbs script (cos it doesn't work with a shortcut to the bat, set to "minimized") ...

    call bat.vbs (called by the .jsx)
    Code:
    Set WshShell = CreateObject("WScript.Shell") 
    WshShell.Run chr(34) & "C:\Win 10 beep.bat" & Chr(34), 0
    Set WshShell = Nothing
    from How to run .BAT files invisibly
    Try this:

    rundll32 user32.dll,MessageBeep or rundll32.exe cmdext.dll,MessageBeepStub

      My Computer


  2. Posts : 31,666
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #12

    Robben said:
    .... much Win 10 peculiarities are still new to me.
    I actually created and tested that .bat in Windows 11, before testing it on Windows 10. Should you upgrade to 11 any time you'll know it should work there too.
      My Computers


  3. Posts : 16,949
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #13

    Robben said:
    BTW, to not have the Command Prompt window shown, I'm calling the .bat from this .vbs script (cos it doesn't work with a shortcut to the bat, set to "minimized") ...
    I don't know what .jsx is but you'll find the same problem launching a batch file from the Task scheduler.
    That problem can also be overcome using a vbs script as an intermediary just as you have done. I normally choose to use the WindowStyle 7 [minimised] rather than 0 [hidden].
    e.g. Make Task scheduler run a batch file minimised and with a specific icon - TenForums

    All the best,
    Denis
      My Computer


  4. Posts : 31
    W10 Pro °2022/4
    Thread Starter
       #14

    Bree said:
    I actually created and tested that .bat in Windows 11, before testing it on Windows 10. Should you upgrade to 11 any time you'll know it should work there too.
    Thanks. Every little thing helps :)

    Try3 said:
    I don't know what .jsx is.
    Just a text file with (Photoshop-specific) javascript inside.

    Compumind said:
    Try this:
    rundll32 user32.dll,MessageBeep or rundll32.exe cmdext.dll,MessageBeepStub
    Thanks, but I think I tried that before the BEL thing and it was not to my satisfaction. Others are reporting problems with it too.

    Anyway, I'm happy with what I've got for now.
    Thanks to everyone chiming in!
      My Computer


  5. Posts : 4
    W10
       #15

    3 ways


    Code:
    echo/|choice/n 2>nul
    
    powershell [console]::beep(500,500)
    
    PowerShell Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('Hello world')
      My Computer


  6. Posts : 31
    W10 Pro °2022/4
    Thread Starter
       #16

    Thanks :)

    Not long after I implemented some of this stuff, I think I had an error dialog to do with audio, which I'm pretty sure was from calling one of these methods from within Photoshop.

    Not long after, I got more problems with my PC than I have ever experienced. Even my BIOS crashed, but luckily repaired itself. I still have weird leftover problems from all of that...

    In the meantime I have discovered you can do a beep from inside a Photoshop script, which should be a much safer bet...

    The script is simply...
    Code:
    app.beep();
    Last edited by Robben; 23 Aug 2022 at 02:16.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:59.
Find Us




Windows 10 Forums