APSF //- Move to next visible object in the list, slew to it, //- and display info about the object. Repeat until //- the list is complete. A "poor man's" AutoStar tour. //- //- Paul Rodman, 2008 //- //- Version 1.0 4 Feb 2008 //- Initial release dim n,result as integer, data(-1) as string, found as boolean if nObjects<=0 then return // No objects n=max(0,SelectedObject-1) while true do // Find next visible object while true n=n+1 if n>nObjects then bleep if Confirmation("No more visible objects in list.", _ "End the script","Restart from the beginning") then return end if n=0 end if if n>0 and Obj(n).IsVisible then exit wend Obj(n).Selected=true Yield found=OKCancel("Press OK to slew to "+Obj(n).ID+"."+EndOfLine+ _ "Press Cancel to skip to next visible object.") loop until found result=Obj(n).SlewTo select case result case -1 bleep print "Telescope not connected!" return case 0 // Successful data.Append "ID: "+Obj(n).ID if Obj(n).Name<>"" then data.Append "Name: "+Obj(n).Name data.Append "Type: "+Obj(n).Type if Obj(n).Magnitude<30.0 then data.Append "Magnitude: "+format(Obj(n).Magnitude,"-0.0") data.Append "Altitude: "+str(round(Obj(n).Altitude))+DegreeSymbol if Obj(n).Size<>"" then data.Append "Size: "+Obj(n).Size if Obj(n).Constellation<>"" then data.Append "Constellation: "+Obj(n).Constellation data.Append "" data.Append "Notes:" if Obj(n).Notes<>"" then data.Append Obj(n).Notes if not OKCancel(Join(data,EndofLine)+EndOfLine+EndOfLine+ _ "Press OK to find next visible object."+EndOfLine+ _ "Press Cancel to end script.") then return else bleep print "Unable to slew for some unknown reason! Press OK to move to next object" end select wend