@WINVDESK — Searches for a matching window, and returns the virtual desktop on which it appears.

Syntax:
%@WINVDESK[window,flags]

windowwindow title, program name, PID, or HWND
flagsbitmapped:
    1: return a GUID; otherwise it’s the virtual desktop’s name

Virtual Desktops require at least Windows 10. Under earlier versions of Windows, @WINVDESK will always return 0.