Advertisement
Guest User

Untitled

a guest
Apr 1st, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. $MouseEventSig=@'
  2. [DllImport("user32.dll",CharSet=CharSet.Auto, CallingConvention=CallingConvention.StdCall)]
  3. public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);
  4. '@
  5. $MouseEvent = Add-Type -memberDefinition $MouseEventSig -name "MouseEventWinApi" -passThru
  6. [System.Windows.Forms.Cursor]:Position = New-Object System.Drawing.Point(45,53)
  7. $MouseEvent::mouse_event(0x00000002, 0, 0, 0, 0);
  8. $MouseEvent::mouse_event(0x00000004, 0, 0, 0, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement