#SingleInstance Force global myOutput := "No output" global count := 0 SetupGui() { Gui, New, , Mouse test Gui, Add, Button, gReloadScript w180, Reload Gui, Add, Text, vmyOutput w180, %myOutput% Gui, Show OnMessage(0x0200, "WM_MOUSEMOVE") } ReloadScript() { Reload } SetupGui() Loop { GuiControl, , myOutput, %myOutput% sleep 200 } IncrementCount() { count++ myOutput = %count% GuiControl,, myOutput, %myOutput% } DecrementCount() { count-- myOutput = %count% GuiControl,, myOutput, %myOutput% } OnMessage(0x404, "AHK_NOTIFYICON") AHK_NOTIFYICON(wParam, lParam, uMsg, hWnd) { if (lParam = 0x200) ;WM_MOUSEMOVE := 0x200 return SetupGui() return } WheelUp::IncrementCount() WheelDown::DecrementCount()