APSF //- Put web links to the SEDS database into a user field. //- Any Mxxx, NGCxxxx or ICxxxx objects will get links. //- //- Paul Rodman, January 2009 //- (from an idea by Craig Starnes) //- //- V1.0 30 Jan 2009 //- Initial release sub main() dim uf,i,j as integer dim ufname(-1),prefix(-1),sid as string prefix.Append "M" prefix.Append "NGC" prefix.Append "IC" for i=1 to 4 ufname.Append str(i)+": "+UserHeading(i) next SetChoiceParameter("Which user field?",uf,ufname) if not EditParameters("SEDS Links") then return uf=GetChoiceParameter("Which user field?")+1 UserHeading(uf)="SEDS Link" for i=1 to nObj sid=ReplaceAll(Obj(i).ID," ","") Obj(i).User(uf)="" for j=0 to ubound(prefix) if left(sid,len(prefix(j)))=prefix(j) and IsNumeric(mid(sid,len(prefix(j))+1)) then Obj(i).User(uf)="http://seds.org/~spider/ngc/ngc.cgi?"+sid exit end if next next end sub main