/// <summary> /// 开票软件前置,detail填写,暂时这样--如果分辨率调整肯定会受到影响的 /// </summary> static void InfoTianKai() { Thread.Sleep(100); WinApi.ShowWindow((IntPtr)1442640, 2); Thread.Sleep(100); WinApi.ShowWindow((IntPtr)1442640, 3); Thread.Sleep(100); WinApi.SetFocus((IntPtr)1442640); Thread.Sleep(100); WinApi.SetForegroundWindow((IntPtr)1442640); Thread.Sleep(2000); for (var i = 0; i < 5; i++) { WinApi.ClickLocation((IntPtr)7145062, 10, 25 + 23 * i + 12); //可以点中第一行第一块 HxShengQing.GetTableFocus(); Thread.Sleep(100); SendKeys.SendWait($"{i}aaaaa"); WinApi.keybd_event(Keys.Tab, 0, 0, 0); HxShengQing.WriteGoodsTaxNoAdd(IntPtr.Zero, null); Thread.Sleep(1000); HxShengQing.ClickBtnByName((IntPtr)7472786, "增行"); Thread.Sleep(1000); } }