
So, without bringing Winamp to the front, how can I simulate a mouse click on it, without bringing it to the foreground, and at a specific X/Y mouse position without moving the mouse so obviously to the user?
I found this StackOverflow link:
https://stackoverflow.com/questions/123 ... ck-message
And it appears that I can perhaps do it with these two lines of code:
Code: Select all
Macro MAKELPARAM(loWord,hiWord) : (hiWord << 16 | loWord) : EndMacro
SendMessage_(Winamp_hWnd,#WM_LBUTTONDOWN,#MK_LBUTTON,MAKELPARAM(x,y))

viewtopic.php?p=465341#p465341
Alternatively, how can I convert the following to PureBasic (from that same link), which also appears to be what I want:
Code: Select all
{
INPUT input;
input.type=INPUT_MOUSE;
input.mi.dx=0;
input.mi.dy=0;
input.mi.dwFlags=(MOUSEEVENTF_ABSOLUTE|MOUSEEVENTF_MOVE|MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP);
input.mi.mouseData=0;
input.mi.dwExtraInfo=NULL;
input.mi.time=0;
SendInput(1,&input,sizeof(INPUT));
return 0;
}