Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CSScript-related function generates an EXE.
#7
Thanks again for your reminder.
Now I've generated the C# code as an external DLL file and used the `Call` function to invoke it — it works well on Windows 10.

However, on some Windows 7 systems where .NET 4 is not installed, I set the runtime option (`net_clr_version = "v2.0.50727"`), but it doesn't work — it still reports an error saying the .NET 4.0 assembly could not be loaded.

Also, how to catch this runtime error? I'd like to execute a function to install the .NET 4 runtime when this error occurs.

Macro Macro7
Code:
Copy      Help
out 
RTOPTIONS xrt; xrt.net_clr_version="v2.0.50727"; RtOptions 32 xrt

str s="aaa 123 ccc"

str p=
;\d+

str t="BBB"

CsScript x.Load(":10 $desktop$\spt.dll")

mes x.Call("replace" s p t)


Messages In This Thread
RE: CSScript-related function generates an EXE. - by Davider - 06-05-2025, 02:08 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)