Skip to content

how does movemouse work? #113

Description

@alejo9010

hello, im triying to make this work to move mouse to relative window coord, so i got this

        public async void SetCursorPosition(Point p)
        {
            await Delay(500);
            Rectangle rect;
                NativeMethods.GetWindowRect(process.MainWindowHandle, out rect);
            p.X = p.X + rect.Left;
            p.Y = p.Y + rect.Top;
            simulator.Mouse.MoveMouseTo(Convert.ToDouble(p.X), Convert.ToDouble(p.Y));
        }

but the mouse is off by alot from the actual Point where it should move, i debug the app, and the coords are correct. any idea what happen ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions