Open Side Menu Go to the Top
Register
AHK Programming question: How to do a mouseclick that doesnt actually move the mouse AHK Programming question: How to do a mouseclick that doesnt actually move the mouse

07-10-2008 , 10:39 PM
I want to write a script that does some mouseclicking at certain positions on the screen, without actually moving the mouse cursor/clicking the mouse.

Is this possible?
AHK Programming question: How to do a mouseclick that doesnt actually move the mouse Quote
07-10-2008 , 11:12 PM
Code:
PostLeftClick(x, y, table_id) {
  ; ### JUK: Send the down left click, then the mouse-up messages.
  ; NOTE: This is relative to the top left of the client area and NOT the top left of the
  ; window (ie: It *doesn't* include the title-bar like AHK's MouseClick does!!!).
  PostMessage, 0x201, 0x0001, ((y<<16)^x), , ahk_id%table_id%
  PostMessage, 0x202 , 0, ((y<<16)^x), , ahk_id%table_id%
}
Juk
AHK Programming question: How to do a mouseclick that doesnt actually move the mouse Quote

      
m