Help updating volume script Topic is solved

Discuss the future of the AutoHotkey language
Fleming
Posts: 2
Joined: 21 Jun 2017, 18:30

Help updating volume script

21 Jun 2017, 18:44

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
User avatar
Ragnar
Posts: 254
Joined: 30 Sep 2013, 15:25

Re: Help updating volume script  Topic is solved

22 Jun 2017, 03:59

Too many commas: MouseGetPos ,,, Win should be MouseGetPos ,, Win
Fleming
Posts: 2
Joined: 21 Jun 2017, 18:30

Re: Help updating volume script

22 Jun 2017, 06:23

Now it works as expected.
Thank you, sir.

Return to “AutoHotkey v2 Development”

Who is online

Users browsing this forum: No registered users and 7 guests