I am pretty sure that there is no way of detecting a Win32 call, the process receiving it has no information who (keyboard or program) send the call, so it has to accept the call as legit.
I would suggest that you write a little C++/C# or VB script to test it.
I can provide you with a small C# code example I wrote (pretty bad don't judge me)
to send a click at given Point P.
Code:
public void leftMouseClick(object parameter)
{
Point p1 = (Point)parameter;
string lParam = p1.Y.ToString("X4") + p1.X.ToString("X4");
uint num = uint.Parse(lParam,
System.Globalization.NumberStyles.AllowHexSpecifier);
SendMessage(hWdn, WM_LBUTTONDOWN, 1, num);
SendMessage(hWdn, WM_LBUTTONUP, 0, num);
}
P.s I know that there is a way of filtering out the calls by the information provided by the LPARAM and WPARAM but I don't think that they went this far to block it.