Screen coordinates function

Hi,

Is there a function to calculate coordinates for sendinput so you don't have to do it manually ?

I'm using this formula right now:

mov [click_event.mi.dx], 500*(0xFFFF/1920)
mov [click_event.mi.dy], 500*(0xFFFF/1080)

which is equivalent to 500x500 xy position on the screen in 1920x1080 resolution.

I need it to be calculated dynamically and not at compilation time because of different resolutions so now I have to read current resolution and use additional arithmetic instructions which I feel is overkill if I can just call a function that will do it for me.

sorry for using asm example but all I need is the name of the function if there is such.
Last edited on
thanks, I will look into them.
Topic archived. No new replies allowed.