From d9db9a6a40aff44a1582dbb033865ec2aa3af36e Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Fri, 5 Apr 2002 22:12:59 +0000 Subject: [PATCH] Added TCL_EVAL_GLOBAL flag to the send eval. Updated the documentation. --- Readme | 4 ++-- WinSendCom.c | 2 +- winsend.dsp | 10 +++++++++- winsend.man | 4 ++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Readme b/Readme index 26828fe..be8d19e 100644 --- a/Readme +++ b/Readme @@ -11,7 +11,7 @@ not be blocked by badly behaving windows applications. An example (from tkcon): from a concurrent tclsh: % package require winsend | % package require winsend - 0.3 | 0.3 + 0.4 | 0.4 % winsend interps | % winsend interps tkcon.tcl | tkcon.tcl TCLSH.EXE | % winsend send tkcon.tcl set x 1 @@ -50,7 +50,7 @@ Tcl version printed in your DOS box. See http://tclsoap.sourceforge.net/winsend.html and - http://tclsoap.sourceforge.net/winsend.zip + http://prdownloads.sourceforge.net/tclsoap/winsend-0.4.zip for the docs (this document) and code respectively. Pat Thoyts. diff --git a/WinSendCom.c b/WinSendCom.c index 53f0bae..fd7e912 100644 --- a/WinSendCom.c +++ b/WinSendCom.c @@ -217,7 +217,7 @@ Send(WinSendCom* obj, VARIANT vCmd, VARIANT* pvResult) { Tcl_Obj *script = Tcl_NewUnicodeObj(v.bstrVal, SysStringLen(v.bstrVal)); - r = Tcl_EvalObjEx(obj->interp, script, TCL_EVAL_DIRECT); + r = Tcl_EvalObjEx(obj->interp, script, TCL_EVAL_DIRECT | TCL_EVAL_GLOBAL); if (pvResult) { VariantInit(pvResult); diff --git a/winsend.dsp b/winsend.dsp index 9d143a8..5f9c6a4 100644 --- a/winsend.dsp +++ b/winsend.dsp @@ -125,6 +125,10 @@ SOURCE=.\WinSendCom.h # End Group # Begin Source File +SOURCE=.\LICENSE +# End Source File +# Begin Source File + SOURCE=.\Readme # End Source File # Begin Source File @@ -133,7 +137,11 @@ SOURCE=.\test.vbs # End Source File # Begin Source File -SOURCE=.\winsend.html +SOURCE=.\test2.vbs +# End Source File +# Begin Source File + +SOURCE=.\winsend.man # End Source File # End Target # End Project diff --git a/winsend.man b/winsend.man index abced4e..b1a8a05 100644 --- a/winsend.man +++ b/winsend.man @@ -59,8 +59,8 @@ Windows Scripting Host cscript application using [example { Set interp = GetObject("\\.\TclInterp\tkcon.tcl") interp.Send "puts {Hello from VB Script}" - WScript.Echo interp.Send("info tcl") -}] + WScript.Echo interp.Send("info tcl")}] + Provided you have an instance of Tcl running registered with [cmd {winsend appname tkcon.tcl}] you should see the message appear in the Tcl window and the Tcl version should be printed to the cscript -- 2.23.0