Camera connect

Scripts and programs to automate Astroart
Post Reply
Forum_2018
Posts: 263
Joined: 17 Dec 2018, 14:45

Camera connect

Post by Forum_2018 »

Hallo,

I am facing a problem using the Camera.Connect, Guider.Connect, Telescope.Connect commands whenever used via a button graphic menu.
The following is the script I used as a test inside the simulator environment:
-----------------------------------
conn$=""
butconnect=InputButton("Connect"+Conn$,"Cam1","Cam 2","Telescope","End")
while butconnect<>"End"
if butconnect="Cam1" Then
Camera.Connect
Conn$=": Cam1 OK"
endif
if butconnect="Cam2" Then
Guider.Connect
Conn$=": Cam2 OK"
endif
if butconnect="Telescope" Then
Telescope.Connect
Conn$=": Telescope OK"
endif
endwhile
end
-----------------------------------

Running the script the "End" button works normally, but selecting Cam1 or Cam2 or Telescope the requested connection is done but the script freezes and the button menu does not appear anymore.
What i am doing wrong?

Emilio

Forum_2018
Posts: 263
Joined: 17 Dec 2018, 14:45

Re: Camera connect

Post by Forum_2018 »

Hallo,
InputButton should be inside the loop, so:

conn$ = ""
butconnect = ""
while butconnect <> "End"
butconnect = InputButton("Connect"+Conn$, "Cam1", "Cam 2", "Telescope", "End")
....
....

Forum_2018
Posts: 263
Joined: 17 Dec 2018, 14:45

Re: Camera connect

Post by Forum_2018 »

Thanks Fabio, now it works.

Post Reply