ActiveX mystery

Discussion in 'Scripting and Programming' started by jbredmo, Apr 1, 2015.

  1. jbredmo

    jbredmo Cyanogen Customer

    Joined:
    Nov 3, 2014
    Messages:
    34
    Location:
    Erieville, NY
    I'm attempting to learn how to use the scripting capability of Maxim DL 6.08. I find that using the run script command to execute the acquire.vbs script included with the program results in an error message:

    ActiveX component can't create object: 'DriverHelper.Util'
    Code 800A01AD
    Microsoft VBScript runtime error

    A similar message occurs when I try to select my mount controller in Sky Flats Assistant. I see others have asked about ActiveX but I can't find any answers. The Maxim DL manual opens its discussion of scripting with an explanation of ActiveX.

    What am I missing?
    Thanks,

    John
     
  2. Owen Lawrence

    Owen Lawrence Retired Staff

    Joined:
    Oct 1, 2014
    Messages:
    1,397
    Perhaps the discussion here describes your situation.

    - Owen -
     
  3. jbredmo

    jbredmo Cyanogen Customer

    Joined:
    Nov 3, 2014
    Messages:
    34
    Location:
    Erieville, NY
    Thanks Owen, I believe it does. I run Win7 Pro 64 bit. Could not find the referenced .util file anywhere.
    What about Visual Studio Express? I did download that last year. That must be a 64 bit program. The trouble is I'm completely new to scripting and don't have the most basic knowledge, for example, what does "dim" mean? How can I get a leg up on this? I've seen other posts from puzzled subscribers, but haven't come across a bootstrap level intro to scripting.

    I was thinking of trying to get the script to run in VS rather than establish a 32 bit Cmd window. I wouldn't know how to integrate the process anyway. Most practitioners of this art are way ahead of me in this respect, but I'd like to get started!

    Thanks,

    John
     
  4. Owen Lawrence

    Owen Lawrence Retired Staff

    Joined:
    Oct 1, 2014
    Messages:
    1,397
    You should start by reading Microsoft documentation, and then come back to the examples. The acquire.vbs script is showing its age by not working on your machine. The DriverHelper.Util object is only being used for some string manipulation, so if you can build up some skills in that area you should be able to eliminate it. In more general terms, look up "COM Automation", which is what MaxIm DL implements. Your choice of how to access the automation interface is a personal one and there are many many ways to skin this particular cat.

    Yes, we should probably update our samples, but it's not high on the priority list. Sorry about that. I'll log a bug report that cites this discussion.

    - Owen -
     
  5. jbredmo

    jbredmo Cyanogen Customer

    Joined:
    Nov 3, 2014
    Messages:
    34
    Location:
    Erieville, NY
    Thanks Owen. If my skills can be built sufficiently, then I'll be way ahead of the game! But I'm glad to know that I'm not suffering from some basic lack of comprehension about what's supposed to happen when I try to run the script. I was just looking for a way to slew to a target in the middle of the night and begin a sequence of captures WITHOUT having to arise to do it. Lazy, but need my sleep.

    Best wishes,

    John
     
  6. Owen Lawrence

    Owen Lawrence Retired Staff

    Joined:
    Oct 1, 2014
    Messages:
    1,397
    Have a look at CCDCamera.StartSequence. A lot of the code in acquire.vbs is for parsing a text file of targets. You can concoct whatever method you like to replace all that (along with the offending DriverHelper.Util calls), including hard coding your target parameters right in your script.

    Make your first attempt as simple as possible and get it working before adding a lot of other stuff. The sample shows examples of how to do the important things like slewing the telescope and connecting to a camera.

    - Owen -
     
  7. jbredmo

    jbredmo Cyanogen Customer

    Joined:
    Nov 3, 2014
    Messages:
    34
    Location:
    Erieville, NY
    Ah ha! That's a good clue. I figured there had to be a way to use the saved sequences for this purpose. Thanks again,

    John
     
  8. Bob Denny

    Bob Denny Cyanogen Customer

    Joined:
    Oct 12, 2014
    Messages:
    746
    Location:
    DC-3 Dreams, SP, Mesa, Arizona +1 480 396 9700
    The old ASCOM DriverHelper is deprecated. It is now ASCOM.Utilities. THis object is present in all ASCOM Platforms, and it is documented in the Developer Components package (a separate install).
     
  9. jbredmo

    jbredmo Cyanogen Customer

    Joined:
    Nov 3, 2014
    Messages:
    34
    Location:
    Erieville, NY
    Thanks Bob. I've been working through tutorials in Visual Studio and am in better position to take advantage of your tip. I'll report back when I've had a chance to work through the code. It also occurred to me that what I seek to accomplish has been more than provided for in some of the observatory control software readily available. I've downloaded a trial version of CCD AutoPilot. But I've become intrigued with scripting and will keep learning!

    John
     

Share This Page