Meadow View Observatory Start Up Script

 

 

 

 

Set myActiveHome = WScript.CreateObject("x10.ActiveHome")

Set myCam = WScript.CreateObject("CCDSoft2XAdaptor.CCDSoft5Camera")

Set myMount = WScript.CreateObject("TheSkyXAdaptor.RASCOMtele")

 

Set WshShell = WScript.CreateObject("WScript.Shell") 'Shell object to execute other applications
Set Speech = CreateObject("SAPI.SpVoice")
Set FSO = CreateObject("Scripting.FileSystemObject")
Dim sText
Sub Talk
SpeakText sText
End Sub

Sub SpeakText(sText)
On Error Resume Next
Speech.Speak sText, SVSFlagsAsync + SVSFPurgeBeforeSpeak
Do
Sleep 100
Loop Until Speech.WaitUntilDone(10)
End Sub

 

sText="Starting up meadow view Observatory imaging systems"
Talk
wscript.Sleep 2000

sText="Power on camera and filter Wheel"
Talk
myActiveHome.SendAction "sendplc", "D8,on" 'Turn on power for Camera + Filter Wheel
wscript.Sleep 3000

sText="Power on Mount"
Talk
myActiveHome.SendAction "sendplc", "D1,on" 'Turn on AP900 mount
wscript.Sleep 3000

sText="Power on Telescope"
Talk
myActiveHome.SendAction "sendplc", "D3,on" 'Turn on DSI Scope
wscript.Sleep 3000

sText="Power on rotator"
Talk
myActiveHome.SendAction "sendplc", "A5,on" 'Turn on Pyxis Rotator
wscript.Sleep 3000

 

sText="Start The Sky X"
Talk
WshShell.Exec "C:\Program Files (x86)\Software Bisque\TheSkyX Professional Edition\TheSkyX.exe" 'Start The Sky X
wscript.Sleep 3000

sText="Connect Main Camera"
Talk
mycam.Connect()
wscript.Sleep 2000

sText="Connect Telescope"
Talk
myMount.Connect()
wscript.Sleep 2000

sText="Park Telescope"
Talk
myMount.Park()
wscript.Sleep 2000

sText="Telescope Parked"
Talk

 

sText="Start CCD auto pilot"
Talk
WshShell.Exec "C:\Program Files (x86)\CCDware\CCDAutoPilot5\CCDAutoPilot5.exe " 'Start up the CCDAP5 program
wscript.Sleep 2000

 

sText="Turn on red lights"
Talk
myActiveHome.SendAction "sendplc", "J2,on" 'Turn on Red Lights
wscript.Sleep 2000 '2 second delay

sText="Turn off Garden lights"
Talk
myActiveHome.SendAction "sendplc", "B1,off" 'Turn off Garden lights
wscript.Sleep 2000 '2 second delay

sText="Turn off Security lights"
Talk
myActiveHome.SendAction "sendplc", "E4,off" 'Turn off Security lights
wscript.Sleep 2000 '2 second delay

sText="Raise light shield"
Talk
myActiveHome.SendAction "sendplc", "K3,on" 'Turn on Light Killer Curtain
wscript.Sleep 2000

sText="Meadow view observatory is read E for imaging run."
Talk