In app Macro language in .Net Core?

SilverShaded

Well-known member
Joined
Mar 7, 2020
Messages
103
Programming Experience
10+
Hi, i though VSTA might be the asnwer but turned out not to be, so does anyone know if there are any easy to implement solutions for having a macro language inside a .Net Core app, int the same way as VBA exists in office apps?
 
Some people host LUA or Python within their apps.
 
Sounds interesting. Ugly default scripting languages though: JavaScript, JScript, VBScript. On the plus side you can adopt other languages, and hosting seems to be simple for those languages. Now I'm curious what it would take to add another language.
 
Found another called paxscript which lets you work in c# and more importantly seems to have syntax checking. It’s round about now my brain gets overloaded, might try it tommorrow.
 
Interestingly, there is was a one and done post in this same forum about it: paxScript for .NET
 
Well my head is getting swamped with stuff. I found some decent editors (avalonia, avalon & a simple IDE called .NET IDE control (nice effort but not complete)). Running the script seems to be easy enough, if a decent syntax checking editor is available. I also ned ot be able to add in objects form my main program. What im trying to do is control a Solar inverter and battery charging so only need simple code that does simple things.

If battery flat and power cheap and tomorrow not sunny, charge battery... :)

The customizable scripting above might be interesting as long as i can add in objects, like "battery", "Inverter" etc.
 
In my day, we just had green (or amber) phosphors -- none of this syntax coloring stuff...

:)
 
What im trying to do is control a Solar inverter and battery charging so only need simple code that does simple things.

If only my solar installer would give me that kind of access to the system. Even though I own the system, apparently, I'm not allowed to control the system. *Sigh*
 
If only my solar installer would give me that kind of access to the system. Even though I own the system, apparently, I'm not allowed to control the system. *Sigh*

Mines a Sofar ME3000, I added an serial link to it from a low power PC in the garage and can talk to it via modbus. Most, but not all of the functions are working via modbus, enough that i can make use of it anyway. I could just hard code the logic but if other people want to use it it would be nice to allow some customisation.
 
Most of the stuff ive looked at only seems to work in .Net Framework, for core I think I have two options, I like the cusomizable scripting code above and found Vassilli Kaplans GIT repository with the complete code. Alternatively, i allready had a very simple parser in another project which was interpreting cell formulas in a spreadsheet which could also be used.

Im wondering how difficult it would be to use a Rich Text Control and feed back / highlight any errors to give some indication of coding errors. The script language could be quite simple and limited as mentioned above, just basic math and a few custom objects with functions. I'd just rather have the full C# language avaialable :(

Going to think about it for a day ot two... :)
 
Yes, in the past people have used the RichEdit and RichEdit 2.0 controls to provide syntax highlighting for their code editors. The Rich Text Box is just a wrapper around the RichEdit 2.0. Unfortunately the wrapper only provides rudimentary control over the formatting. You'll very likely need finer grained control which will force you to send Windows messages to the underlying control directly.
 

Latest posts

Back
Top Bottom