Page 1 of 1

Help updating volume script

Posted: 21 Jun 2017, 18:44
by Fleming
2.0 a079 introduced the big changes.
I managed to insert quotes and spaces as new syntax requires to run the following volume management code w/o error, nevertheless it doesn’t work as expected.
Could you be so kind to enlighten me what has to be changed as well? (Perhaps about MouseGetPos or WinExist.)

Code: Select all

#If MouseIsOver("ahk_class Shell_TrayWnd")

    WheelUp::
    Send "{Volume_Up}"
    SoundPlay "*-1"
    return

    WheelDown::
    Send "{Volume_Down}"
    SoundPlay "*-1"
    return

    MButton::
    Send "{Volume_Mute}"
    SoundPlay "*-1"
    return

    MouseIsOver(WinTitle) {
        MouseGetPos ,,, Win
        Return WinExist(WinTitle . " ahk_id " . Win)
    }

#If

Re: Help updating volume script  Topic is solved

Posted: 22 Jun 2017, 03:59
by Ragnar
Too many commas: MouseGetPos ,,, Win should be MouseGetPos ,, Win

Re: Help updating volume script

Posted: 22 Jun 2017, 06:23
by Fleming
Now it works as expected.
Thank you, sir.