Exemplo n.º 1
0
 void OutRoom()
 {
     NativeHelper.LbuttonClick(KakaoTalkService.SearchOpenedChatRooms()[0].Handle, 330, 50);
     Thread.Sleep(33);
     SendKeyInput(KakaoTalkService.SearchOpenedChatRooms()[0].Handle, (IntPtr)NativeHelper.VK_DOWN);
     Thread.Sleep(33);
     SendKeyInput(KakaoTalkService.SearchOpenedChatRooms()[0].Handle, (IntPtr)NativeHelper.VK_DOWN);
     Thread.Sleep(33);
     SendKeyInput(KakaoTalkService.SearchOpenedChatRooms()[0].Handle, (IntPtr)NativeHelper.VK_DOWN);
     Thread.Sleep(33);
     SendKeyInput(KakaoTalkService.SearchOpenedChatRooms()[0].Handle, (IntPtr)NativeHelper.VK_DOWN);
     Thread.Sleep(33);
     SendKeyInput(KakaoTalkService.SearchOpenedChatRooms()[0].Handle, (IntPtr)NativeHelper.VK_DOWN);
     Thread.Sleep(33);
     SendKeyInput(KakaoTalkService.SearchOpenedChatRooms()[0].Handle, (IntPtr)NativeHelper.VK_DOWN);
     Thread.Sleep(33);
     SendKeyInput(KakaoTalkService.SearchOpenedChatRooms()[0].Handle, (IntPtr)NativeHelper.VK_DOWN);
     Thread.Sleep(33);
     SendKeyInput(KakaoTalkService.SearchOpenedChatRooms()[0].Handle, (IntPtr)NativeHelper.VK_DOWN);
     Thread.Sleep(33);
     SendKeyInput(KakaoTalkService.SearchOpenedChatRooms()[0].Handle, (IntPtr)NativeHelper.VK_DOWN);
     Thread.Sleep(33);
     SendKeyInput(KakaoTalkService.SearchOpenedChatRooms()[0].Handle, (IntPtr)NativeHelper.VK_ENTER);
     Thread.Sleep(500);
     NativeHelper.EnumWindows((x, y) =>
     {
         if (NativeHelper.GetClassNameOfWindow(x) == "EVA_Window_Dblclk")
         {
             if (x.Children().Count() == 0)
             {
                 if (NativeHelper.ColorPickerb(NativeHelper.GetWindowScreen(x), ColorTranslator.FromHtml("#FFEA40")))
                 {
                     Point p = NativeHelper.ColorPicker(NativeHelper.GetWindowScreen(x), ColorTranslator.FromHtml("#FFEA40"));
                     NativeHelper.LbuttonClick(x, p.X, p.Y);
                     return(false);
                 }
             }
         }
         return(true);
     }, IntPtr.Zero);
 }