Fritterandwaste Posted Wednesday at 10:13 PM Posted Wednesday at 10:13 PM 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 Wednesday at 11:00 PM Solution Posted Wednesday at 11:00 PM (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 Wednesday at 11:05 PM by Dan_555 Some of my script sourcecode
Werty Posted Wednesday at 11:35 PM Posted Wednesday at 11:35 PM (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 Thursday at 12:56 AM by Werty Some guy's script + some other guy's script = my script!
Fritterandwaste Posted Thursday at 05:19 AM Author Posted Thursday at 05:19 AM 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.
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