I noticed this was posted in a previous thread:
Can someone tell me does this generate the click at 10,10 relative to the whole screen, or 10,10 relative to the active window?Code:SetCursorPos(10, 10); /* Move the cursor to 10, 10 */ mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); /* Left button down. */ mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); /* Left button up. */
If it is not relative to the active window then how could i make it so that it is? Is there a function that gets the top left x and y co-ordinates of the window so that i can adjust the numbers dynamically?