New Post: Script timeout
Is allow to call Interrupt function from the timer thread or I did not understand correctly?
View ArticleNew Post: Calling VBScript function by dispatchId
Ok, I will to wait your implementation. I tried to implement that as in our legacy application, but that does not work as inspected.
View ArticleNew Post: Script timeout
Yes, ScriptEngine.Interrupt() can be called safely from any thread.
View ArticleNew Post: calling native dll
hi, how can i use native functions from user32.dll or something else in clearscript?
View ArticleNew Post: Handling CLR exceptions in JS
Hi, I'm using the V8ScriptEngine and am wondering how to handle CLR exceptions. Right now, the object I use with AddHostObject may throw some exceptions but I haven't found a way to properly handle...
View ArticleNew Post: calling native dll
Hi furesoft, You can expose a .NET type with a P/Invoke method and invoke it from script. For example:publicstaticclass Native { [DllImport("user32.dll", CharSet = CharSet.Auto)] publicstaticexternint...
View ArticleNew Post: Handling CLR exceptions in JS
Hi Thomas, ClearScript doesn't expose .NET exceptions through the script language's native exception handling mechanism. V8 actually might make this possible, but JScript and VBScript definitely do...
View ArticleNew Post: Calling VBScript function by dispatchId
Small question about debugging. I created my lite variation of the script engine based on your code : ActiveXDebugging.cs ActiveXScripting.cs ActiveXWrappers.cs WindowsScriptEngine.Debug.cs...
View ArticleNew Post: How to call function by name with arguments as array
How to call function by name with arguments as array. Something like this _engine.Execute("sum", new []{ 2, 4});
View ArticleNew Post: How to Access a Web Service?
I'm trying to access a web service from my JavaScript code. I tried to use the AJAX capability of jQuery but ClearScript was not able to load the jQuery library. I got the error "defaultView is not a...
View ArticleNew Post: casting
hi, how can i cast types? like these in c#: (string)helloworld; or these: Convert.ChangeType(helloworld, typeof(string));
View ArticleNew Post: Calling VBScript function by dispatchId
Hi ifle, From the screenshot it looks like you've successfully attached the script debugger to your application and can view the script documents. You should now be able to use the Visual Studio UI to...
View ArticleNew Post: How to call function by name with arguments as array
Hello ifle, Currently ClearScript doesn't have an API method like that. We'll add one in the next release. In the meantime, you can add an extension method that does what you want:publicstaticclass...
View ArticleNew Post: Calling VBScript function by dispatchId
Script that I run (2+3/0) from my test console application throw the divide by zero exception, but VS did not catch it.
View ArticleNew Post: How to Access a Web Service?
Hi Neil, Since you have .NET at your disposal, why not use something like System.Net.WebClient? engine.AddHostType("WebClient", typeof(WebClient)); engine.Execute(@" var client = new WebClient(); var...
View ArticleNew Post: Handling CLR exceptions in JS
Hi, Thanks once again for your quick and thorough reply. I guess this method should be usable in my context. I'd like to take this opportunity to thank you for the outstanding support you're giving to...
View ArticleNew Post: Accessing SqlDataReader from ClearScript
Hi, This does not work:Imports System.Data.SqlClient Imports Microsoft.ClearScript Public Class WebForm1 Inherits System.Web.UI.Page Public engine As Windows.JScriptEngine = New Windows.JScriptEngine...
View ArticleNew Post: Calling VBScript function by dispatchId
Is it possible that the error-generating script ran before you attached the debugger?
View ArticleNew Post: casting
Hi furesoft, You can expose System.Convert to the script engine, or use HostFunctions.cast(). Keep in mind however that numbers are converted to native JavaScript or VBScript values when brought into...
View Article