Results 1 to 3 of 3

Thread: Scripting and external dll

  1. #1
    Junior Member
    Join Date
    Jul 2017
    Location
    Worthing
    Posts
    18

    Scripting and external dll

    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 Butterworth
    Keith Butterworth
    Worthing
    England

    "Retired and happily tinkering with astronomy and astrophotography"

  2. #2
    Developer
    Join Date
    Apr 2012
    Posts
    481
    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.

  3. #3
    Junior Member
    Join Date
    Jul 2017
    Location
    Worthing
    Posts
    18
    Thanks for reply will have a think and see what I can do.
    Keith Butterworth
    Worthing
    England

    "Retired and happily tinkering with astronomy and astrophotography"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •