private void SendNetEaseLeftClick(WndPoints p) { Points pts; pts.x = p.X; pts.y = p.Y; int PointInt = MakePoints(pts); IntPtr wwHandle = GetNetEaseTargetWindow(); SendMessage(wwHandle, (int)WM_LBUTTONDOWN, (int)MK_LBUTTON, MakePoints(pts)); Thread.Sleep(5); SendMessage(wwHandle, (int)WM_LBUTTONUP, (int)MK_LBUTTON, MakePoints(pts)); }
private void FrmMain_Load(object sender, EventArgs e) { GetCloudMusicWindows(); GetWeChatWindows(); tTopMostSetup.Start(); PreDefinedPoints.Add(MO_Prev, new WndPoints(45, 745)); PreDefinedPoints.Add(MO_PlayPause, new WndPoints(101, 743)); PreDefinedPoints.Add(MO_Next, new WndPoints(158, 743)); PreDefinedPoints.Add(MO_Lrc, new WndPoints(1193, 743)); PreDefinedPoints.Add(MO_Repeat, new WndPoints(1157, 743)); KeyPoints[0] = new WndPoints(1158, 743); KeyPoints[1] = new WndPoints(1149, 743); KeyPoints[2] = new WndPoints(1158, 746); KeyPoints[3] = new WndPoints(101, 743); KeyPoints[4] = new WndPoints(1187, 748); for (int i = 0; i < 5; i++) { KeyPointColors.Add(KeyPoints[i], Color.FromArgb(0, 0, 0)); } GetNeteasePlayingState(); }