public Boolean execute(Dictionary <string, String> pv) { String value = con; if (value == null && mField != null) { value = ScriptExecuter.GetFieldValue(mField); } if (value != null) { try { System.Windows.Forms.Clipboard.Clear(); Thread.Sleep(10); System.Windows.Forms.Clipboard.SetText(value); Trace.WriteLineIf(ScriptExecuter.debug_level >= TraceLevel.Info, "拷贝 " + value); } catch (Exception e) { Last_Error = "CopyClipBoard 错误 " + e.Message; return(false); } return(true); } else { Last_Error = "CopyClipBoard 不能找到指定的字段 " + mField; Trace.WriteLine(Last_Error); } return(false); }
public Boolean execute(Dictionary <string, String> pv) { IntPtr wnd_ptr = Win32Locator.locateWindow(wnd_str, Win32Locator.dotNet_Wnd_Postfix); if (wnd_ptr == IntPtr.Zero) { return(false); } String value = con; if (value == null && mField != null) { value = ScriptExecuter.GetFieldValue(mField); } if (value != null) { Trace.WriteLineIf(ScriptExecuter.debug_level > TraceLevel.Info, "Send Message " + value); if (Win32Locator.SendWndMessage(wnd_ptr, value)) { return(true); } Last_Error = "发送消息失败"; Trace.WriteLine(Last_Error); return(false); } else { Last_Error = ("不能找到指定的字段 " + mField); Trace.WriteLine(Last_Error); } return(false); }
public Boolean execute(Dictionary <string, String> pv) { String value = con; if (value == null && mField != null) { value = ScriptExecuter.GetFieldValue(mField); } if (value != null) { try { SendKeys.SendWait(value); Trace.WriteLineIf(ScriptExecuter.debug_level >= TraceLevel.Info, "发送 " + value); } catch (Exception e) { Last_Error = "SendInput 错误 " + e.Message; return(false); } } else { Trace.WriteLine("无数据可发送"); } return(true); }