how a script is called by code

This forum is meant for examples of X# code.

Post Reply
User avatar
softdevo@tiscali.it
Posts: 191
Joined: Wed Sep 30, 2015 1:30 pm

how a script is called by code

Post by softdevo@tiscali.it »

Hi to all,
Sorry I did not understand how a script is called by code, and how to
get return values..
Thank you
User avatar
robert
Posts: 4529
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

how a script is called by code

Post by robert »

Danilo,

After the installation of X# you should have a shortcut on your desktop that brings you the public documents folder on your machine where we have installed some examples.
In the XSharp Script examples inside this folder you will find example programs.

The XIDE subfolder in this examples folder shows step by step examples that Nikos demonstrated in Cologne.

Example 1 shows how to call a script and get its return value with EvaluateAsync()
Example 2 shows how to pass arguments in a "Globals" objects
Example 3 shows how to catch errors
Example 4 shows how to compile a script without executing
Example 5 shows how to catch runtime errors
Example 6 shows how to handle strongly typed return values
Example 7 shows how you can compile a script once and run it many times
Example 8 shows a script that return a System.Func object
Example 9 shows how to access a function in the app from a script
Example 10 shows a script that uses the Dynamic type and late bound calls.

Please have a look at these scripts and let us know which thing you do not understand/
Note: If you want to use the scripts then make sure that the distributable files are available in the current folder or in the path. See the file "c:Program Files (x86)XSharpRedistRedist.txt" for a list of these DLLs.

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply