Script commands in AA8 SP2
Posted: 15 Oct 2022, 15:06
Hello, here are some examples with the new script commands of AA8 SP2:
HourAngle(ra, longitude, [jd])
Calculates the hour angle (in hours, positive if West)
Script.Execute(name)
Launches another script. The name can be a filename with full path, or just a filename from the Script folder, or the name of one of the 8 default scripts in the menu.
Script.Stop
Terminates the script, it's equivalent to the the command: End
Script.Pause(seconds)
Pauses the script, it's equivalent to the command: Pause(seconds)
StarNet.Execute
Launches the StarNet plugin. Before executing this command the plugin must be already activated (clicking in the menu Plugin). The dialog window can be closed by the way.
StarNet.Check checks if the plugin is present and active. It's suggest to add this command at the beginning of the script.
Focuser.SoftwareCompensation(enable) Focuser.ASCOMCompensation(enable)
Enable or disable the automatic temperature compensation, software or hardware (if available).
Image.Header
Gets the full FITS header of the image.
Image.Maximize , Image.Minimize , Image.Cascade
Modify the placement and size of the image window.
HourAngle(ra, longitude, [jd])
Calculates the hour angle (in hours, positive if West)
Code: Select all
sub TestHourAngle(ra,lon)
h = HourAngle(ra,lon,JD)
if h > 0 then
print h ; "Object at West of meridian"
else
print h ; "Object at East of meridian"
end if
end sub
lon = Observatory.Longitude
TestHourAngle(7.5, lon)
TestHourAngle(15.5, lon)
TestHourAngle(23.5, lon)
Launches another script. The name can be a filename with full path, or just a filename from the Script folder, or the name of one of the 8 default scripts in the menu.
Code: Select all
Script.Execute("D:\temp\MySequence.txt")
Script.Execute("MySequence")
Terminates the script, it's equivalent to the the command: End
Script.Pause(seconds)
Pauses the script, it's equivalent to the command: Pause(seconds)
StarNet.Execute
Launches the StarNet plugin. Before executing this command the plugin must be already activated (clicking in the menu Plugin). The dialog window can be closed by the way.
Code: Select all
StarNet.Check
.... <your code>
StarNet.Execute
Focuser.SoftwareCompensation(enable) Focuser.ASCOMCompensation(enable)
Enable or disable the automatic temperature compensation, software or hardware (if available).
Code: Select all
Focuser.SoftwareCompensation(True)
Gets the full FITS header of the image.
Code: Select all
h = Image.Header
print h
Modify the placement and size of the image window.