private void GetItem(IntPtr hwnd, int x, int y) { MouseTools.SetCursorPosition(x, y); Thread.Sleep(Config.Delay2); KeyBoardTool.KeyDown(Keys.ControlKey); Thread.Sleep(100); SimulateMouseLeft(poeHwnd, x, y); Thread.Sleep(100); KeyBoardTool.KeyUp(Keys.ControlKey); Thread.Sleep(Config.Delay1); }
/// <summary> /// 移動滑鼠到x,y上(桌面座標),並複製 /// </summary> /// <param name="x"></param> /// <param name="y"></param> void POE_GetItemInfo(int x, int y) { MouseTools.SetCursorPosition(x, y); Thread.Sleep(Config.Delay_Scan); KeyBoardTool.KeyDown(Keys.ControlKey); KeyBoardTool.KeyDown(Keys.C); Thread.Sleep(Config.Delay_Scan); KeyBoardTool.KeyUp(Keys.C); KeyBoardTool.KeyUp(Keys.ControlKey); Thread.Sleep(Config.Delay_Scan); Application.DoEvents(); }