Find window and send message API in python

Viewed 21

so I am searching for these API in python such that I can send some commands to a UI,I can find these API in c# but I need these in python .I am working on windows with python 3.9 . I want to pass in some commands to an inactive window ,I had similar thing done via c# which used [DllImport("User32.dll", CharSet = CharSet.Ansi)]

  static extern IntPtr SendMessage(IntPtr hwnd, int uMsg, int wParam, COPYDATASTRUCT lParam);

  [DllImport("User32.dll")]

  static extern int SendMessage(IntPtr hwnd, int uMsg, int wParam, int lParam);

  [DllImport("User32.dll")]

  static extern int SendMessage(IntPtr hwnd, int uMsg, int wParam, StringBuilder sb);

  [DllImport("User32.dll")]

  static extern IntPtr FindWindow(string lpClassName, string WindowName);

I need to carry similar operation in python

0 Answers
Related