21 SkyWatcher Scripting
WARNING! – use the API at your own risk. It’s recommended that you do not leave the mount alone while running scripts. Green Swamp is not responsible for any damage resulting from using the API interface.
Running scripts requires that GSS be running and connected to the mount. You can start GSS on its own or by using other external programs that will load the GSS ASCOM driver such as CDC or SGP. Unless you’re experienced with how GSS separates ASCOM commands from the API It’s recommended that GSS be running on its own so no other external sources can interfere or interact with running scripts.
GSS exposes a number of class members available to external programs and scripting languages. There are PowerShell example scripts located in the GSS Program files scripting directory. Find the installation section of this manual for directory locations.
The example scripts we’re created using the Windows 10 PowerShell ISE. To run PowerShell, type in the Windows search box “PowerShell ISE” and run either the 64 bit or X86 versions. You may run into problems executing scripts because of Windows security settings. There are a number of ways to correct this and you should search google for Microsoft’s recommended approach. One way is to allow the current logged in user the ability to run script. The following command can be run within PowerShell by placing it on the first line and clicking execute or the run button.
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force;