Integrate scripts into delphi
How can I execute an external scrip开发者_Go百科t in Delphi (like wsh, vbs, bat...) and get back the result? I want to launch them as task within a thread do other things and when the result is ready the scripts itself will inform the application which will receive it in main thread. How to achieve that?
Use Microsoft's Windows Script COM interfaces, in particular the IActiveScript
interface.
You mention a lot of different script languages and engines in your question. They have all different possibilities. If you are free to choose your script language i would suggest two approaches:
Have a look at http://www.scalabium.com/smscript.htm they have a nice component to execute a script (VBScript, JavaScipt) and get the return value.
Have a look at http://www.remobjects.com/ps.aspx RemObjects Pascal Script, this is a very powerfull script language and there are plenty of examples around.
I suggest Delphi Web Script (DWS). This is excellent and aggressively updated by Eric - see his blog.
Fast Report have Fast Script used in their famous reporting Fast Report
TMS software also have TMS Scriptor studio and TMS Scriptor studio pro
精彩评论