public static void ChatboxSendText(String text) { if (IsChatboxOpened) { KeyLowHelper.PressKey(MicrosoftVirtualKeys.VK_LCONTROL); KeyLowHelper.PressKey(MicrosoftVirtualKeys.A); KeyLowHelper.ReleaseKey(MicrosoftVirtualKeys.A); KeyLowHelper.ReleaseKey(MicrosoftVirtualKeys.VK_LCONTROL); KeyLowHelper.PressKey(MicrosoftVirtualKeys.Delete); KeyLowHelper.ReleaseKey(MicrosoftVirtualKeys.Delete); Thread.Sleep(200); // 修改成50,从200,想快点 } else { KeyLowHelper.SendEnter(); Open.Reset(); while (!IsChatboxOpened && !Open.IsReady) { Thread.Sleep(2); } } SendTextNow(text); Thread.Sleep(1000); // 修改成100,从1000,想快点 KeyLowHelper.SendEnter(); }
public static void SendLuaOverChat(String text) { if (String.IsNullOrWhiteSpace(text)) { return; } if (Mail.MailFrame.CurrentTabIsSendMail) { Mail.MailFrame.ClickInboxTab(); } if (IsChatboxOpened) { KeyLowHelper.PressKey(MicrosoftVirtualKeys.VK_LCONTROL); KeyLowHelper.PressKey(MicrosoftVirtualKeys.A); KeyLowHelper.ReleaseKey(MicrosoftVirtualKeys.A); KeyLowHelper.ReleaseKey(MicrosoftVirtualKeys.VK_LCONTROL); KeyLowHelper.PressKey(MicrosoftVirtualKeys.Delete); KeyLowHelper.ReleaseKey(MicrosoftVirtualKeys.Delete); Thread.Sleep(200); // 修改成50,从200,想快点 } else { KeyLowHelper.SendEnter(); Open.Reset(); while (!IsChatboxOpened && !Open.IsReady) { Thread.Sleep(2); } } Clipboard.SetDataObject(text, true, 10, 200); KeyLowHelper.SendCtrlV(); Thread.Sleep(100); KeyLowHelper.SendEnter(); Thread.Sleep(1000); // 修改成100,从1000,想快点 }
public void SetEditBoxTextHooked(string text) { LeftClickHooked(); if (GetEditBoxText.Length > 0) { Thread.Sleep(250); KeyLowHelper.PressKey(MicrosoftVirtualKeys.VK_LCONTROL); KeyLowHelper.PressKey(MicrosoftVirtualKeys.A); KeyLowHelper.ReleaseKey(MicrosoftVirtualKeys.A); KeyLowHelper.ReleaseKey(MicrosoftVirtualKeys.VK_LCONTROL); Thread.Sleep(200); KeyLowHelper.PressKey(MicrosoftVirtualKeys.Delete); KeyLowHelper.ReleaseKey(MicrosoftVirtualKeys.Delete); for (int i = 0; i < 8; i++) { KeyLowHelper.PressKey(MicrosoftVirtualKeys.Back); Thread.Sleep(100); } KeyLowHelper.ReleaseKey(MicrosoftVirtualKeys.Back); Thread.Sleep(550); } KeyHelper.SendTextNow(text); Thread.Sleep(500); }