private void ClickMemberName(int hWnd) { if (hWnd != 0) { if (_desk.AssistWindow != null) { WndAssist.XYRatio toLogicalRatioWithUIThread = _desk.AssistWindow.ToLogicalRatioWithUIThread; int x = (int)(88.0 / toLogicalRatioWithUIThread.XRatio); int y = (int)(54.0 / toLogicalRatioWithUIThread.YRatio); WinApi.ClickPointBySendMessage(hWnd, x, y); } else { Log.Info("AssistWindow==null,无法ClickMemberName,seller=" + _desk.Seller); } } }
private void ClickTask() { try { int toolbarPlusHwnd = _desk.Automator.ToolbarPlusHwnd; Rectangle windowRectangle = WinApi.GetWindowRectangle(toolbarPlusHwnd); WndAssist.XYRatio toLogicalRatioWithUIThread = Wnd.ToLogicalRatioWithUIThread; int xr = (int)(100.0 / toLogicalRatioWithUIThread.XRatio); int yr = (int)(15.0 / toLogicalRatioWithUIThread.YRatio); int x = windowRectangle.Width - xr; int y = windowRectangle.Height - yr; WinApi.ClickPointBySendMessage(toolbarPlusHwnd, x, y); } catch (Exception e) { Log.Exception(e); } }