danyk Posted July 17, 2010 Share Posted July 17, 2010 (edited) Hi,I am using a program called Breakaway Audio Enhancer and i want to make a function to programmatically, in autoit, toggle the mute-status of the application.On their forum someone said that the mute-function "It is actually bound to the mute button on a multimedia keyboard.".How can I simulate this keypress to their application? I have tried ControlSend("Breakaway", "", "", "{VOLUME_MUTE}") without any luck.Btw, I am doing this since muting the special Breakaway-mixer (at least in Win7) has no effect, the sound continues anyway. But if I press mute on my keyboard, it mutes <- I want that from autoit. Windowinfo>>>> Window <<<< Title: Breakaway Class: PhysicalWindow_0000024c Position: 1103, 209 Size: 194, 494 Style: 0x96020000 ExStyle: 0x00000000 Handle: 0x0000000000311B92 Edited July 17, 2010 by danyk Link to comment Share on other sites More sharing options...
jaberwacky Posted July 18, 2010 Share Posted July 18, 2010 If you use COntrolSend() then you have to specify a specific control right? Tyr using Send() instead. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
danyk Posted July 18, 2010 Author Share Posted July 18, 2010 If you use COntrolSend() then you have to specify a specific control right? Tyr using Send() instead.Hi, thanks for the suggestion.Send() works, however I first have to WinActivate the window, and I was really hoping for a solution that does not popup windows in front while the user is using the computer. :-)But unless there is another way.. Link to comment Share on other sites More sharing options...
jaberwacky Posted July 19, 2010 Share Posted July 19, 2010 (edited) I think without being able to specify a particular control then you're out of luck. But don't take my word for it. I'm certainly no expert. You could try this possibly buggy example and then report the results: Func BreakAway_Mute() Switch WinActive("BreakAway - or whatever the title is") Case 0 BlockInput(1) Local Const $active_current = WinGetHandle("") WinActivate("BreakAway - or whatever the title is") Send("{VOLUME_MUTE}") WinWaitNotActive("BreakAway - or whatever the title is") WinActive($active_current) BlockInput(0) Case Else Send("{VOLUME_MUTE}") EndSwitch EndFunc ;==>BreakAway_Mute Edited July 19, 2010 by jaberwocky6669 Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
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