Scripting Guide - Overview

ACP Observatory Control Software supports user-written scripts which can control most aspects of the scope. A scripting control (the "console") is used to load and run scripts. The console also provides for interaction between the user and the running script. The console also provides a way to run scripts from remote web browsers, and the scripting environment provided by the console contains numerous "intrinsic" objects ready to use without needing to be created beforehand.

Scripts may be written in any language whose interpreter uses the ActiveX Scripting features that are built into Windows (see Requirements & Resources). VBScript and JScript are part of the Windows operating system. However, you can also use Perl or Python by installing the scripting engine yourself. VBScript looks "easy" but it is very limited in its flexibility and error handling. JScript, Perl and Python are extremely powerful. If you are a professional astronomer, you may have encountered Perl on Unix systems. Unless you're married to VBScript, it is strongly suggested that you start out with JScript. You'll avoid regrets and relearning later!

Scripts have access to most aspects of the ACP observatory by way of a set of objects exposed to all scripts by ACP and other programs such as MaxIm DL or FocusMax, as well as ASCOM drivers for devices. The properties and methods of these objects encapsulate the functionality of the devices or engines, and provide numerous utility functions for astronomical use. For example, the ASCOM Telescope object encapsulates the telescope itself. To get the current right ascension of the scope, you retrieve the Telescope.RightAscension property (in the syntax of your chosen language).

For more powerful applications, you can write complete programs in any .NET language, Visual Basic 6, Delphi, C++, or any other language that supports ActiveX-Automation. ACP exposes the same set of objects to external programs via Automation. This feature provides you with virtually unlimited possibilities for astronomy applications, and you don't need to be concerned with the low-level issues in dealing with instruments.