APSF //- Special script to do the following: //- Look for object user field called "Months" //- Assume that the field contains strings of the form a,b,...,c, where a,b,etc. are //- month numbers (1,2,...,12) //- If the object Months field contains the specified month number, force highlight it. //- //- Paul Rodman for C.S., July 2008 //- //- V1.0 25 July 2008 //- Initial release dim i,j,m,u as integer, ok as boolean dim s(-1),month(-1) as string for i=1 to 4 if UserHeading(i)="Months" then u=i exit end if next if u<1 then print "No user field called ""Months""!" return end if // Load persistent values SaveRestoreGlobal(true) m=RestoreIntegerValue("m",0) month=MonthNames month(0)="Current month" SetPopupParameter("Month",m,month) if not EditParameters("Highlight Month") then return m=GetPopupParameter("Month") // Save persistent values SaveIntegerValue("m",m) if m=0 then m=MonthOfDate(CurrentDate) for i=1 to nObjects s=Split(Obj(i).User(u),",") ok=false for j=0 to ubound(s) if val(trim(s(j)))=m then ok=true exit end if next Obj(i).ForceHighlight=ok next