Page 1 of 1

Scripting and external dll

Posted: 26 Dec 2018, 20:39
by Forum_2018
Hi me again

is it possible to interact with an external dll from the script language - the reason I ask is I would like to control my Hitecastro power hub - specifically the dew heaters from astroart scripting - I have done a little research but it is 5 years since I did any serious programming with windows and com etc so forgive my simple questions.


Hitecastro supply a dll and quote


Using mhpCOM.
mhpCOM can be used with any programming or scripting language which
supports COM interop. Examples are the .net languages from Microsoft. Visual
Basic.net, Visual C# .net and Visual C++ can be downloaded freely from the
Microsoft Visual Studio Express site. Many other languages and tools will also
be eminently suitable. Scripting languages such as VBScript or JavaScript can
also leverage the functionality of mhpCOM.


an example use from vbscript would be

Dim mhp
Set mhp = CreateObject(“mhpCOM.mhpCOM”)

or

Dim mhp
Set mhp = CreateObject(“mhpCOM.mhpCOM”)
mhp.Heater 3, 75



My question is

Is this easy from astroart scripting?
If not what do I need to get into to achieve this?
Any other question that I cant think of due to my ignorance!?

many thanks

Keith

Re: Scripting and external dll

Posted: 26 Dec 2018, 20:40
by Forum_2018
Hello, it's not possible directly, but can be done in this way:

1) Using any programming language you create a program(s) which commands the heater with those COM functions.
2) You call the program with the script command "System.Execute()"

The program should command the heater then exit.
It could also accept parameters, for example:

System.Execute("MyHeater.exe 3 75")

Clear skies,
Fabio.

Re: Scripting and external dll

Posted: 26 Dec 2018, 20:40
by Forum_2018
Thanks for reply will have a think and see what I can do.