Results 1 to 3 of 3

Thread: Camera connect

  1. #1

    Camera connect

    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

  2. #2
    Developer
    Join Date
    Apr 2012
    Posts
    499
    Hallo,
    InputButton should be inside the loop, so:

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

  3. #3
    Thanks Fabio, now it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •