SHARE
TWEET

Untitled

a guest Jul 23rd, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const int ButtonId = 0x0000E910;
  2. IntPtr handle = IntPtr.Zero;
  3. Process[] localAll = Process.GetProcesses();
  4. foreach (Process p in localAll)
  5. {
  6.     if (p.MainWindowHandle != IntPtr.Zero)
  7.     {
  8.         ProcessModule pm = GetModule(p);
  9.         if (pm != null && p.MainModule.FileName == fn)
  10.             handle = p.MainWindowHandle;
  11.     }
  12. }
  13. if (handle == IntPtr.Zero)
  14. {
  15.     Console.WriteLine("Not found");
  16.     return;
  17. }
  18. Console.WriteLine("{0:X}", handle);
  19. IntPtr hWndButton = GetDlgItem(handle, ButtonId);
  20. string myText = getText.GetControlText(hWndButton);
  21. Console.WriteLine("Error Code = {0}", GetLastError());
  22. Console.WriteLine("Iput Window Text !!! = {0}", myText);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top