Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

sound in PC Speaker only


  • Please log in to reply
13 replies to this topic
Guest
  • Guests
  • Last active:
  • Joined: --
i'm just exploring if AHK can perform a BEEP Sound in the PC internal speaker only without the beep sounding through the line out of the sound card?

i'm thinking of using it in an input command whenever the wrong codes are entered, and i don't want others to hear the beep from the music which is playing in my computer...

Beastmaster
  • Members
  • 191 posts
  • Last active: Apr 23 2007 02:58 PM
  • Joined: 15 Apr 2004
`a alert (bell) -- corresponds to Ascii value 7. It can also be manifest in some applications by typing Control+G.

Taken from AHK's help, keyword: escape

Guest
  • Guests
  • Last active:
  • Joined: --
thanks for your reply but i'm just a newbie here and i'm a little confused...

how do you perform the alert (bell) escape sequence in a script? is it by itself or is it inside other commands?

i've try using all of the lines below

`a
msgbox, `a
send, `a
sendraw, `a
controlsend, ,`a

and the pc speaker doesn't seem to beep. sorry for being so dumb here... just trying to learn from you guys...

thanks.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Even if you get an app to respond to the Alert (`a) character, the app might simply do a normal Windows beep. However, there are quite a few 3rd party utilities to beep the speaker. For example, this one can be simply run by the Run command:
ftp://ftp.externet.hu/pub/mirror/sac/ut ... eepdos.zip (however, I'm not sure it works in NT/2k/XP).

Sounding a beep through the PC speaker is a good idea for a new feature. I've put it on the list to look into it.

BoBo
  • Guests
  • Last active:
  • Joined: --
As I've looked for "alert" options as well:
beside the option of a(n acoustic alert like a) beep I thought about to use a tray icon which indicates the status of whatever process (visual alert). The work around I thought about was:

two compiled AHK scripts (using a red light- , green light icon) which should be triggered via a hotkey to be swapped.

Nonsense ?

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Using an icon is a good idea. You could even make the icon "flash" by using SetTimer to periodically change back and forth between two icons. If you don' t mind having the script's own icon altered, you might be able to accomplish this without using two scripts.

Also, the scripts do not need to be compiled for their icons to change. Example:
Menu, tray, icon, MyIcon.ico

BoBo
  • Guests
  • Last active:
  • Joined: --
Thx Chris,

:D

Gre
  • Guests
  • Last active:
  • Joined: --
I am not sure if it is what you want.It will just play a Beep.
RunWait,%comspec% /c ECHO •,,Hide

Candle
  • Members
  • 326 posts
  • Last active: May 17 2010 03:04 PM
  • Joined: 19 Aug 2004
Hey Gre , thats cool .

Brazuca
  • Guests
  • Last active:
  • Joined: --
I was looking for something like this too.
Is the runwait command really necessary?

BoBo
  • Guests
  • Last active:
  • Joined: --
Run,%comspec% /c ECHO •,,Hide
That should work as well

Gre
  • Guests
  • Last active:
  • Joined: --
Run... will work OK. I used RunWait just because it is "sound related".
Just a nonsense,hehehe.

BoBo
  • Guests
  • Last active:
  • Joined: --
Btw what's the ASCII value of this character ?

Gre
  • Guests
  • Last active:
  • Joined: --
Using
Transform, OutputVar, Asc, •

Value returned is 149