#If documentation

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
V0RT3X
Posts: 244
Joined: 20 May 2023, 21:59
Contact:

#If documentation

Post by V0RT3X » 03 Apr 2024, 09:34

Referencing example #1 on the #If documents page for scrolling volume when mouse cursor is over the taskbar, this also produces a vertical scrollbar gui.
https://www.autohotkey.com/docs/v1/lib/_If.htm#ExVolume
image.png
image.png (791 Bytes) Viewed 88 times
Is there anyway to use this example without the gui being created?

Code: Select all

#If MouseIsOver("ahk_class Shell_TrayWnd")
WheelUp::Send {Volume_Up}
WheelDown::Send {Volume_Down}

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

User avatar
mikeyww
Posts: 27216
Joined: 09 Sep 2014, 18:38

Re: #If documentation

Post by mikeyww » 03 Apr 2024, 09:52

Code: Select all

#Requires AutoHotkey v1.1.33.11
WheelUp::SoundSet +10

User avatar
V0RT3X
Posts: 244
Joined: 20 May 2023, 21:59
Contact:

Re: #If documentation

Post by V0RT3X » 03 Apr 2024, 09:58

Thank you, I was just looking into making that swap.
So do you know if that Gui created is by the {Volume_Up} and {Volume_Down} commands?
That became my suspicion, but I haven't come across anything stating as much yet.
Thanks for the suggestion!!

User avatar
mikeyww
Posts: 27216
Joined: 09 Sep 2014, 18:38

Re: #If documentation

Post by mikeyww » 03 Apr 2024, 10:04

Those are not commands but are key names. These key names do not create a GUI, but Windows responds to certain triggers to create the on-screen display that you have noticed. There might be additional triggers, too; I am not sure of the entire set.

Post Reply

Return to “Ask for Help (v1)”