' MacroName: SaveSearch ' MacroDescription: Search the save file for a given title or ' OCLC# ' Macro written by: Joel Hahn, Niles Public Library District sub main Dim CS as Session Set CS=CurrentSession Begin Dialog UserDialog 101,61,"Search" OKButton 8,40,40,14 CancelButton 52,40,40,14 OptionGroup .TitleOclc OptionButton 8,12,28,8,"Title" OptionButton 40,12,52,8,"OCLC Number" TextBox 8,24,84,12,.Data End Dialog Dim Search as UserDialog x=Dialog(Search) If x=0 Then Goto Done 'If Search.TitleOclc=0 Then 'Title 'If Search.TitleOclc=1 Then 'OCLC Number SR%=1 : SC%=1 : y=1 Do While CS.Find(Search.Data, SR%, SC%)=FALSE CS.PutText "PDN", 1, 1 RunMacro "PRSMUTIL!SendCommand" CS.GetTextInRegion test$, 2, 1, 2, 15 'msgBox "/" & test$ & "/" If test$="You are already" then MsgBox "Not found." Goto Done End If y=y+1 If y>=80 Then Exit Do Loop If SR%<>1 and SC%<>1 Then MsgBox "Text Found at: " & CStr(SR%) & ", " & CStr(SC%) & "." Else MsgBox "Not found." End If Done: end sub