' MacroName: NextRec ' MacroDescription: Jumps to the next record in a list when FOR can't ' Written by: Joel Hahn, Niles Public Library District sub main Dim CS as Session Set CS=CurrentSession CS.GetChar Char$, Attrib%, 4, 10 If Char$<>Chr(34) Then CS.GetTextInRegion Locale$, 4, 10, 4, 70 Locale$=RTrim(Locale$) Goto Cont End If i=11 'Do While i<62 ' CS.GetChar Char$, Attrib%, 4, i ' If (Char$=Chr(34)) Or (Char$=Chr(46)) Then ' Scol%=i-1 ' Exit Do ' End If ' i=i+1 'Loop Scol% = 62 CS.GetTextInRegion Locale$, 4, 11, 4, Scol% Locale$ = Trim(Locale$) Cont: CS.PutText "GOB", 1, 1 RunMacro "PRSMUTIL!SendCommand" i=6 Do While i<25 CS.GetChar TChar$, Attrib%, i, 1 If Attrib%<>NORMAL Then LineNum=i Exit Do End If i=i+1 Loop If LineNum=0 Then If InStr(Locale$, "-")<>0 Then CS.GetChar NextSub$, Attrib%, 8, 3 If NextSub$="E" Then LineNum=1 Goto DoIt Else CS.GetChar NextSub2$, Attrib%, 11, 3 If NextSub2$="E" Then LineNum=1 Goto DoIt Else CS.PutText "GOB", 1, 1 Goto Cont End If End If Else ALoc$=Locale$ End If SRow2%=6 SCol2%=1 CS.Find ALoc$, SRow2%, SCol2% LineNum=SRow2% End If CS.GetTextInRegion LNum$, LineNum, 3, LineNum, 5 LineNum=Val(LTrim(LNum$)) If (Left(LNum$, 1)="R") Or (Left(LNum$, 1)="E") Then LineNum=Val(LTrim(Right(LNum$, Len(LNum$)-1))) End If If LineNum = 0 Then LineNum = 1 DoIt: CS.PutText LineNum+1, 1, 1 RunMacro "PRSMUTIL!SendCommand" Done: end sub