Fritterandwaste Posted February 19 Posted February 19 Hi I have developed a GUI that allows me to navigate through small icon-like images on the screen using arrow keys. The "current" selected image is indicated by a transparent square graphic that I move according to the arrows pressed and is used to "frame" the image. It behaves as I expect but... on some moves of the square graphic a sound is emitted suggesting an error, notification or some other windows event but it's clearly being caused by my app. Under what circumstances is such a sound emitted please and how can I avoid it? I have a loop that executes when any arrow key is pressed to prevent it triggering multiple unintended moves and I have a feeling it has something to do with that - perhaps the app is being deemed to be "busy" in some context. Any help that can be offered would be greatly appreciated.
Solution Dan_555 Posted February 19 Solution Posted February 19 (edited) I had that problem while programming the chip 8 emulator. Basically whenever a button has focus and you press a key that does do nothing, a warning sound is played. If you open the windows 10 sound settings at the top right hand side there will be a related setting: "Sound Control Panel" There click on sounds and in program events search the default beep. It is this sound that plays. (or open the commandline or press Win R and launch mmsys.cpl ) Edited February 19 by Dan_555 Some of my script sourcecode
Werty Posted February 19 Posted February 19 (edited) Have you tried using Opt("GUIOnEventMode", 1) ? Gui Reference in the helpfile, at the bottom "Gui Event Modes". https://www.autoitscript.com/autoit3/docs/guiref/GUIRef.htm Edited February 20 by Werty Some guy's script + some other guy's script = my script!
Fritterandwaste Posted February 20 Author Posted February 20 Thank you both. Dan 555 - you have hit the nail on the head thank you very much. It is indeed connected with focus so, in that knowledge, I can now find a solution or, at worst, change the default beep to silent. Werty - I learned something thank you. Having read the help, I think I have to avoid the suggested EventMode route because I need the app to loop in order to trigger timer based events but thank you nevertheless.
rudi Posted April 22 Posted April 22 This is a script that I wrote 15 years ago for PCs in open-plan offices: There it is annoying when every little Windows error on each of 30 PCs in a room always leads to some pling, plong beep. It sets “no sound” for all Windows system sounds. This means that the loudspeaker itself can stay on (Teams / Zoom / Youtube etc. have sound) And as already mentioned: 15 years old, should actually be completely rewritten, but it does what it's supposed to. WinSoundsOff.au3 Earth is flat, pigs can fly, and Nuclear Power is SAFE!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now