And it occurred to me that the question isn't whether the active window is the main Foobar window, but whether the active window is any Foobar window. Revised script:
; Suppress scroll Wheel signals in Foobar Seekbar and Volume Control
; Rev. 1
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#HotkeyInterval 1000 ; These two lines allow 200 wheel signals a second
#MaxHotkeysPerInterval 200 ; before AutoHotkey stops to complain
WheelUp:: ; Intercept Wheelup
Process, priority,,B
WinGet ActiveWinProcess, ProcessName, A ; Get the Process Name for the active window
if (ActiveWinProcess!="foobar2000.exe") ; If the active window isn't Foobar
Goto SendUp ; go send WheelUp
MouseGetPos,,,,ClassNN
if (ClassNN="{596C5150-D8FF-4ed4-81AB-99B3DDA08AF1}1") ; If in Seekbar, send nothing
Return
if (ClassNN="{5C0890EE-4552-4dcf-8943-3F1563A13F1D}1") ; If in Vol Ctrl, send nothing
Return
SendUp:
Send {WheelUp} ; Otherwise pass WheelUp
Return
WheelDown:: ; Intercept WheelDown
Process, priority,,B
WinGet ActiveWinProcess, ProcessName, A ; Get the Process Name for the active window
if (ActiveWinProcess!="foobar2000.exe") ; If the active window isn't Foobar
Goto SendDown ; go send WheelDown
MouseGetPos,,,,ClassNN
if (ClassNN="{596C5150-D8FF-4ed4-81AB-99B3DDA08AF1}1") ; If in Seekbar, send nothing
Return
if (ClassNN="{5C0890EE-4552-4dcf-8943-3F1563A13F1D}1") ; If in Vol Ctrl, send nothing
Return
SendDown:
Send {WheelDown} ; Otherwise pass WheelDown
Return