Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compile and run C# code string sent from QM to the LA HTTP server
#12
The following example code cannot be executed
[Image: a.gif]

Code:
Copy      Help
/*/ nuget Roslyn\Microsoft.CodeAnalysis.CSharp; /*/
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis;
using System.Runtime.Loader;
using System.Reflection;


string code = """
using System;
using Au;

foreach (var v in args) print.it(v);
dialog.show("test");
"""
;

var c = CsScript.Compile(code);
if (c == null) return;

//print.redirectConsoleOutput = true; //need this if the script contains Console.WriteLine and the caller app isn't console
c.Run("command", "line", "arguments");


Messages In This Thread
RE: Call C# functions from anywhere using URL (HTTP server) - by Davider - 06-20-2023, 10:34 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)