Jump to content

Trying to send Volume_Mute to application


Recommended Posts

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. :blink:

Windowinfo

>>>> Window <<<<
Title:  Breakaway
Class:  PhysicalWindow_0000024c
Position:   1103, 209
Size:   194, 494
Style:  0x96020000
ExStyle:    0x00000000
Handle: 0x0000000000311B92
Edited by danyk
Link to comment
Share on other sites

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

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 by jaberwocky6669
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...