Scripting and external dll

Scripts and programs to automate Astroart
Post Reply
Forum_2018
Posts: 263
Joined: 17 Dec 2018, 14:45

Scripting and external dll

Post 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

Forum_2018
Posts: 263
Joined: 17 Dec 2018, 14:45

Re: Scripting and external dll

Post 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.

Forum_2018
Posts: 263
Joined: 17 Dec 2018, 14:45

Re: Scripting and external dll

Post by Forum_2018 »

Thanks for reply will have a think and see what I can do.

Post Reply