| View previous topic :: View next topic |
| Author |
Message |
Guest Guest
|
Posted: Fri Aug 20, 2004 5:42 am Post subject: sound in PC Speaker only |
|
|
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... |
|
| Back to top |
|
 |
Beastmaster
Joined: 15 Apr 2004 Posts: 182
|
Posted: Fri Aug 20, 2004 7:35 am Post subject: |
|
|
`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 |
|
| Back to top |
|
 |
Guest Guest
|
Posted: Fri Aug 20, 2004 11:10 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10465
|
Posted: Fri Aug 20, 2004 12:35 pm Post subject: |
|
|
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/utilmisc/beepdos.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. |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Fri Aug 20, 2004 1:27 pm Post subject: |
|
|
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 ? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10465
|
Posted: Fri Aug 20, 2004 1:40 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Fri Aug 20, 2004 1:48 pm Post subject: |
|
|
Thx Chris,
 |
|
| Back to top |
|
 |
Gre Guest
|
Posted: Sat Aug 21, 2004 4:21 am Post subject: |
|
|
I am not sure if it is what you want.It will just play a Beep.
RunWait,%comspec% /c ECHO •,,Hide |
|
| Back to top |
|
 |
Candle
Joined: 19 Aug 2004 Posts: 334
|
Posted: Sat Aug 21, 2004 5:34 am Post subject: |
|
|
| Hey Gre , thats cool . |
|
| Back to top |
|
 |
Brazuca Guest
|
Posted: Sat Aug 21, 2004 6:31 pm Post subject: |
|
|
I was looking for something like this too.
Is the runwait command really necessary? |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Sat Aug 21, 2004 6:52 pm Post subject: |
|
|
| Code: | | Run,%comspec% /c ECHO •,,Hide |
That should work as well |
|
| Back to top |
|
 |
Gre Guest
|
Posted: Sat Aug 21, 2004 7:07 pm Post subject: |
|
|
Run... will work OK. I used RunWait just because it is "sound related".
Just a nonsense,hehehe. |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Sat Aug 21, 2004 7:13 pm Post subject: |
|
|
| Btw what's the ASCII value of this character ? |
|
| Back to top |
|
 |
Gre Guest
|
Posted: Sat Aug 21, 2004 7:22 pm Post subject: |
|
|
Using
Transform, OutputVar, Asc, •
Value returned is 149 |
|
| Back to top |
|
 |
|