ࡱ>  }  g!"#$%&'(*+91./0:2345678);<=>?@ABCEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefijklmnopqrstuvxyz{|~Root Entry(b`%_ LDBGotoEndOfLine.SRC$DGotoEndOfLine.DES$7GotoEndOfLine.BIN$C H  "#$%'(*+,-.01235689:;<>?@ABCDEFGHIJKLMPOQRSTUVWXYZ[\]^_jabcdefghijmnopqrstuvwxyz}|}~' MacroName: GotoEndOfLine ' MacroDescription: Move cursor to the end of any text in the current field sub main Dim CS as Session Set CS = CurrentSession CurRow=CS.CursorRow CurCol=CS.CursorColumn InData="" i=0 Do Until (InData=" " or CurCol+i=79) CS.GetTextInRegion InData, CurRow, CurCol+i, CurRow, CurCol+i+1 i=i+1 Loop If i>1 Then For j=1 to (i-1) CS.Send chr(27)+"[C" Next j a$=CStr(i-1) End If end sub Move cursor to the end of any text in the current fieldQ*{:@$e !#% [C #V F ,<LdtCSCurRowCurColInData_i____j__amain5F FmK+Passport ~u2\[q2\ q2\ 7<,L,5\<L dOk q, L < L d t2\, L <L l Ln jLc3q<l5\dt2\$iL SessionApplication' MacroName: ISBN ' MacroDescription: Jump down to ISN: line sISBN.SRC ISBN.DESISBN.BIN|Double049.SRC!ub main dim CS as session set CS = CurrentSession CS.Send "\x1B[L" CS.Send "\x09\x09\x09\x09\x09\x09" end sub Jump down to ISN: lineQ/$>U#Y\x1B[L \x09\x09\x09\x09\x09\x09L#V FCS_mainF FmK+Passport& ~u2\[q5 2\q5 2\ SessionApplication' MacroName: Double049 ' MacroDescription: Adds interfacing/changing library info to a ' Libs+ record ' Macro written by: Joel Hahn, Niles Public Library District sub main 'Replace the #'s with your library's four-letter code Agency$="####" Dim CS as Session Set CS=CurrentSession a$="\Adds 049 JEDA & 049 KAJA to a CLSI recordr" a$=a$+"049\x09aJEDA" a$=a$+"\x1B[A\x09\r" a$=a$+"049\x09a"Double049.DES "&)Double049.BINJ)Logon.SRC/Logon.DES!4$+Agency$ a$=a$+"\x1B[A\x09" CS.Send a$ end sub 3QM$#####\r 049\x09aJEDA \x1B[A\x09\r049\x09a \x1B[A\x09 3#V FAgencyCSa__mainF FmK+Passport8 5~u2\[5 5' MacroName: Logon ' MacroDescription: Log onto Libs+ ' Macro written by: Joel Hahn, Niles Public Library District sub main 'replace the "defaults" with your logon & password Agency$="default" Password$="default" dim CS as session set CS = CurrentSession CS.Receive 21, "ully." CS.Send Agency$+"\r" CS.RecLog onto CCS via the niktech accounteive 6, "Password:" CS.Send Password$+"\r" CS.Receive 6, "CONTINUE" CS.Send "\r" end sub +QA$# Logon.BIN7-PlaceHold.SRC=+ PlaceHold.DES= NgPlaceHold.BINndefaultully.\r  Password:CONTINUE+#V FAgencyPasswordCS_mainF FmK+Passport0 55~u2\ [q52\q' MacroName: PlaceHold ' MacroDescription: From an item record in B/I Maint or Inquiry, ' switch to Holds Processing, place a hold, ' and switch back. ' Macro written by: Joel Hahn, Niles Public Library District Sub main Dim CS as Session Set CS=CurrentSession Dim nTimeOut as Integer ' The default timeout for each command is 1 minute. ' Increase this value if your host requires more time ' for each command. nTimeOut = 60 CS.GetTextInRegion RowText, 3, 1, 3, 78 WhichButton=1 Begin Dialog Barcodes 65,58,"Barcode Entry" TextBox 2,2,60,12,.BCode OptionGroup .HoldOptions OptionButton 16,16,28,8,"Local",.OptionButton1 OptionButton 16,24,32,8,"System",.OptionButton2 OptionButton 16,32,24,8,"Item",.OptionButton3 OKButton 2,42,28,15,.OK CancelButton 32,42,29,15,.Cancel End Dialog Dim BCodeDialog As Barcodes WhichButton=Dialog(BCodeDialog) If WhichButton=0 Then Goto done barcode$=BCodeDialog.BCode From an item record in B/I Maint or Inquiry, switch to Holds Processing, place a hold, and switch back.HoldType%=BCodeDialog.HoldOptions If InStr(1, RowText, "MAINTENANCE", 1)>2 Then CS.Send chr(1) + "p" 'Shift-F16 'B/I Maint Else CS.Send chr(1) + "n" 'Shift-F14 'B/I Inquiry End if ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" CS.Send chr(1) + "K" 'F11 ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" CS.Send barcode$ + chr(13) 'Input staff card # here ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[13;49H" 'Session.Send chr(1) + "K" 'F11 ' Wait for response from host. 'CS.Receive nTimeout, chr(27) + "[8;49H" 'Session.Send "3" '1=Local, 2=System, 3=Item If HoldType%=1 Then 'System CS.Send "2" ElseIf HoldType%=2 Then 'Item CS.Send "3" Else 'Local CS.Send "1" End if ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" CS.Send chr(1) + "K" 'F11 ' Wait for response from hoWordBack.SRC;`WordBack.DESk4WordBack.BIN:lWordForward.SRC V{' MacroName: WordBack ' MacroDescription: Move the cursor to the beginning of the current word Sub main Dim CS as Session Set CS=CurrentSession CurRow=CS.CursorRow CurCol=CS.CursorColumn InData="" i=1 Do Until (InData=" " or InData="/") or (CurCol-i=1) 'InData=Session.ScreenText(CurRow, CurCol-i, 1, 2) CS.GetChar InData, Attrib%, CurRow, CurCol-i CS.GetChar CheckChar, Attrib%, CurRow, CurCol-(i+1) If (i=1 and (InData=" " or InData="/") And CheckChar<>" ") Then InData="" 'MsgBox "/" & InData & "/" i=i+1 Loop i=i-1 If i>1 Then For j=1 to (i-1) CS.Send chr(27)+"[D" Next j End If End Sub Move the cursor to the beginning of the current wordQ+|HN$s# /[D #V F ,<Ll|~CSCurRowCurColInData_i_Attrib_CheckChar_j__main F FmK+Passport ~u2\[q2\ q2\ 7<,L,5\<,5dlL q,| L2\<, q~| L <2\l~ L,5\<,5dl~5 7<,L <LLLLYjLc3q<l5\ l2\%i SessionApp' MacroName: WordForward ' MacroDescription: Move the cursor to the beginning of the next word in a line sub main Dim CS as Session Set CS = CurrentSession CurRow=CS.CursorRow CurCol=CS.CursorColumn InData="" i=0 Do Until (InData=" " or InData="/" or CurCol+i=79) CS.GetChar InData, Attrib%, CurRow, CurCol+i i=i+1 Loop If i>1 Then For j=1 to i CS.Send chr(27)+"[C" Next j a$=CStr(i-1) End If end sub Move the cursor to the beginning of the next word in a lineQ+|@F$k# /[C s#V F ,<Ll|WordForward.DES ;WordForward.BIN @AddALA.SRC AddALA.DEShCSCurRowCurColInData_i__Attrib_j__amain F FmK+Passport ~u2\[q2\ q2\ 7<,L,5\<,5dlL |OT q, L <2\l, L <L t Lh jLc3q<l5\ l|2\%iL SessionApplicationInsert ALA diacritics into CLSI records where you want, rather than always at the beginning of the line.' MacroName: GoBack ' MacroDescription: Go back (F9) a certain number of records or items Sub main ' Go back (F9) a certain number of records or items Dim CS as Session Set CS=CurrentSession Dim nTimeOut as Integer ' The default timeout for each command is 3 minutes. ' Increase tgature, right Case 41 CS.Send Chr(229) 'Macron Case 42 CS.Send Chr(167) 'Miagkii Znak Case 43 CS.Send Chr(169) 'Musical flat Case 44 CS.Send Chr(204) 'Musical sharp Case 45 CS.Send Chr(188) 'O-hook, lowercase Case 46 CS.Send Chr(172) 'O-hook, uppercase Case 47 CS.Send Chr(178) 'O-slash, lowercase Case 48 CS.Send Chr(162) 'O-slash, uppercase Case 49 CS.Send Chr(182) 'OE-ligature, lowercase Case 50 CS.Send Chr(166) 'OE-ligature, uppercase Case 51 CS.Send Chr(203) 'Patent Case 52 CS.Send Chr(171) 'Plus/minus Case 53 CS.Send Chr(200) 'Question mark, inverted Case 54 CS.Send Chr(224) 'Question mark, pseudo Case 55 CS.Send Chr(170) 'Registered trademark Case 56 CS.Send Chr(180) 'Thorn, lowercase Case 57 CS.Send Chr(164) 'Thorn, uppercase Case 58 CS.Send Chr(228) 'Tilde, non-spacing Case 59 CS.Send Chr(184) 'Turkish i w/o dot Case 60 CS.Send Chr(183) 'Tverdyi znak Case 61 CS.Send Chr(189) 'U-hook, lowercase Case 62 CS.Send Chr(173) 'U-hook, uppercase Case 63 CS.Send Chr(232) 'Umlaut Case 64 CS.Send Chr(246) 'Underscore, non-spacing Case 65 CS.Send Chr(249) 'Upadhmaniya End Select Done: End Sub AddALA.BIN ,OChangeByBarcode.SRC(-ChangeByBarcode.DES(PChangeByBarcode.BIN(DT' MacroName: AddALA ' MacroDescription: Insert ALA diacritics into CLSI records where you want, rather than always at the beginning of the line. Sub main Dim CS as Session Set CS=CurrentSession Dim Diacrit$(65) Diacrit$(0) = "Acute" Diacrit$(1) = "AE-ligature, lowercase" Diacrit$(2) = "AE-ligature, uppercase" Diacrit$(3) = "Alif" Diacrit$(4) = "Alpha" Diacrit$(5) = "Ayn" Diacrit$(6) = "Breve" Diacrit$(7) = "British pound" Diacrit$(8) = "Beta" Diacrit$(9) = "Candrabindu" Diacrit$(10) = "Cedilla" Diacrit$(11) = "Cedilla, inverted" Diacrit$(12) = "Circle above" Diacrit$(13) = "Circle below" Diacrit$(14) = "Circumflex/caret, non-spacing" Diacrit$(15) = "Copyright" Diacrit$(16) = "D-slash, lowercase" Diacrit$(17) = "Dot above" Diacrit$(18) = "Dot below" Diacrit$(19) = "Dot in center" Diacrit$(20) = "Double dot above" Diacrit$(21) = "Double dot below" Diacrit$(22) = "Double underscore" Diacrit$(23) = "Double acute" Diacrit$(24) = "Double tilde, left" Diacrit$(25) = "Double tilde, right" Diacrit$(26) = "Eth, lowercase" Diacrit$(27) = "Eth, uppercase" Diacrit$(28) = "Exclamation point, inverted" Diacrit$(29) = "Gamma" Diacrit$(30) = "Grave" Diacrit$(31) = "Hacek" Diacrit$(32) = "High comma, centered" Diacrit$(33) = "High comma, off-center" Diacrit$(34) = "Hook, left" Diacrit$(35) = "Hook, right" Diacrit$(36) = "L-script" Diacrit$(37) = "L-slash, lowercase" Diacrit$(38) = "L-slash, uppercase" Diacrit$(39) = "Ligature, left" Diacrit$(40) = "Ligature, right" Diacrit$(41) = "Macron" Diacrit$(42) = "Miagkii Znak" Diacrit$(43) = "Musical flat" Diacrit$(44) = "Musical sharp" Diacrit$(45) = "O-hook, lowercase" Diacrit$(46) = "O-hook, uppercase" Diacrit$(47) = "O-slash, lowercase" Diacrit$(48) = "O-slash, uppercase" Diacrit$(49) = "OE-ligature, lowercase" Diacrit$(50) = "OE-ligature, uppercase" Diacrit$(51) = "Patent" Diacrit$(52) = "Plus/minus" Diacrit$(53) = "Question mark, inverted" Diacrit$(54) = "Question mark, pseudo" Diacrit$(55) = "Registered trademark" Diacrit$(56) = "Thorn, lowercase" Diacrit$(57) = "Thorn, uppercase" Diacrit$(58) = "Tilde, non-spacing" Diacrit$(59) = "Turkish i w/o dot" Diacrit$(60) = "Tverdyi znak" Diacrit$(61) = "U-hook, lowercase" Diacrit$(62) = "U-hook, uppercase" Diacrit$(63) = "Umlaut" Diacrit$(64) = "Underscore, non-spacing" Diacrit$(65) = "Upadhmaniya" Begin Dialog newdlg 154, 52, "Add Diacritics" DropListBox 5, 5, 88, 85, Diacrit$, .Diacrits OkButton 100, 5, 50, 14 CancelButton 100, 25, 50, 14 End Dialog Dim ALA as newdlg a=Dialog(ALA) If a=0 Then Goto Done Select Case ALA.Diacrits Case 0 CS.Send Chr(226) 'Acute Case 1 CS.Send Chr(181) 'AE-ligature, lowercase Case 2 CS.Send Chr(165) 'AE-ligature, uppercase Case 3 CS.Send Chr(174) 'Alif Case 4 CS.Send Chr(193) 'Alpha Case 5 CS.Send Chr(176) 'Ayn Case 6 CS.Send Chr(230) 'Breve Case 7 CS.Send Chr(185) 'British pound Case 8 CS.Send Chr(194) 'Beta Case 9 CS.Send Chr(239) 'Candrabindu Case 10 CS.Send Chr(240) 'Cedilla Case 11 CS.Send Chr(248) 'Cedilla, inverted Case 12 CS.Send Chr(234) 'Circle above Case 13 CS.Send Chr(244) 'Circle below Case 14 CS.Send Chr(227) 'Circumflex/caret, non-spacing Case 15 CS.Send Chr(202) 'Copyright Case 16 CS.Send Chr(179) 'D-slash, lowercase Case 17 CS.Send Chr(231) 'Dot above Case 18 CS.Send Chr(242) 'Dot below Case 19 CS.Send Chr(168) 'Dot in center Case 20 CS.Send Chr(232) 'Double dot above Case 21 CS.Send Chr(243) 'Double dot below Case 22 CS.Send Chr(245) 'Double underscore Case 23 CS.Send Chr(238) 'Double Acute Case 24 CS.Send Chr(250) 'Double tilde, left Case 25 CS.Send Chr(251) 'Double tilde, right Case 26 CS.Send Chr(186) 'Eth, lowercase Case 27 CS.Send Chr(163) 'Eth, uppercase Case 28 CS.Send Chr(201) 'Exclamation point, inverted Case 29 CS.Send Chr(196) 'Gamma Case 30 CS.Send Chr(225) 'Grave, non-spacing Case 31 CS.Send Chr(233) 'Hacek Case 32 CS.Send Chr(254) 'High comma, centered Case 33 CS.Send Chr(237) 'High comma, off-center Case 34 CS.Send Chr(247) 'Hook, left Case 35 CS.Send Chr(241) 'Hook, right Case 36 CS.Send Chr(190) 'L-script Case 37 CS.Send Chr(177) 'L-slash, lowercase Case 38 CS.Send Chr(161) 'L-slash, uppercase Case 39 CS.Send Chr(235) 'Ligature, left Case 40 CS.Send Chr(236) 'Li&$"q(l2\&%"q(l2\U&&"q(l2\$&'"q(l2\&("q(l2\&)"q(l2\&*"q(l2\`&+"q(l2\/&,"q(l2\&-"q(l2\&."q(l2\&/"q(l2\k&0"q(l2\:&1"q(l2\ &2"q(l2\&3"q(l2\&4"q(l2\v&5"q(l2\E&6"q(l2\&7"q(l2\č&8"q(l2\ƍ&9"q(l2\ȍ&:"q(l2\ʍP&;"q(l2\̍&<"q(l2\΍&="q(l2\Ѝ&>"q(l2\ҍ&?"q(l2\ԍ[&@"q(l2\֍*&Aq(l2\ۘd +:A*JQQW$go(#,AcuteAE-ligature, lowercaseAE-ligature, uppercaseAlifAlphaAynBreve British poundBeta CandrabinduCedillaCedilla, inverted Circle above Circle belowCircumflex/caret, non-spacing CopyrightD-slash, lowercase Dot above Dot below Dot in centerDouble dot aboveDouble dot belowDouble underscore Double acuteDouble tilde, leftDouble tilde, rightEth, lowercaseEt' MacroName: ChangeByBarcode ' MacroDescription: ChangeByBarcode '$Include: "PLUSUTIL!ChangeSubs" 'Declare Function WorkForm() 'Declare Sub GenericChangeCallNum(CallNum$) 'Declare Sub NewBook(CallNum$) sub main dim CS as session set CS = CurrentSession 'On Error Goto ErrHand '! Changes item records; doesn't use a pre-created barcode list Dim nTimeOut as Integer ' The default timeout for each command is 1 minute. ' Increase this value if your host requires more time ' for each command. nTimeOut = 60 InitChoice: Begin Dialog ChoiceDialog 211, 45, "Initial Choice" OkButton 164, 8, 40, 14 CancelButton 164, 24, 40, 14 OptionGroup .WkFmYN OptionButton 8, 12, 156, 10, "Use Workform/Format Change/Add/Del./etc.", .WkFmY OptionButton 8, 24, 114, 10, "Add to/Delete from Call Number", .WkFmN End Dialog Dim ChoiceDia As ChoiceDialog CD=Dialog(ChoiceDia) If CD=0 Then Goto done WkFmYN=ChoiceDia.WkFmYN SecondChoice: If WkFmYN=0 Then 'If only changing call numbers, but not using the built-in 'workform to do so, comment out the following four lines. WkFm=WorkForm If WkFm="" Then Goto done NBLTPT=Left(WkFm, 2) : WkFm=Right(WkFm, Len(WkFm)-2) NB=Left(NBLTPT, 1) : LTPT=Right(NBLTPT, 1) End If If WkFmYN=1 Then 'Don't use workform AddDelete: Begin Dialog AddDelete 197, 118, "Add or Delete" OptionGroup .AddDel OptionButton 9, 4, 116, 10, "Add to start of Adult call number", .ADAdd OptionButton 9, 19, 118, 10, "Add after 'J/' of Juv. call number", .ADAddJ OptionButton 9, 40, 132, 10, "Delete from start of Adult call number", .ADDel OptionButton 8, 53, 126, 10, "Delete after 'J/' of Juv. call number", .ADDelJ OptionButton 8, 72, 33, 10, "Delete", .ADAD OptionButton 8, 86, 33, 10, "Delete", .ADADJ TextBox 127, 11, 63, 12, .Add Text 9, 28, 188, 8, "______________________________________________" h, uppercaseExclamation point, invertedGammaGraveHacekHigh comma, centeredHigh comma, off-center Hook, left Hook, rightL-scriptL-slash, lowercaseL-slash, uppercaseLigature, leftLigature, rightMacron Miagkii Znak Musical flat Musical sharpO-hook, lowercaseO-hook, uppercaseO-slash, lowercaseO-slash, uppercaseOE-ligature, lowercaseOE-ligature, uppercasePatent Plus/minusQuestion mark, invertedQuestion mark, pseudoRegistered trademarkThorn, lowercaseThorn, uppercaseTilde, non-spacingTurkish i w/o dot Tverdyi znakU-hook, lowercaseU-hook, uppercaseUmlautUnderscore, non-spacing UpadhmaniyaAdd DiacriticsDiacrits__ .#W F@" (CSDiacrit_ALAa__mainF FmK+PassportZ ~u2\[5 5 5 & 5 ? 5 F 5 N 5 T 5 \5 l5 s5 5 5 5 5 5 ݠ5 5 6 6 6 &6 96 L6 `6 o6  6 !6 "6 #6 $6 %6 &6  '6 !(6 "")6 /#*6 =$+6 H%,6 ]&-6 r'.6 (/6 )06 *16 +26 ,36 -46 .56 /66 076 186 7296 P3:6 Y4;6 f5<6 6=6 7>6 8?6 9@6 :A6 ;B6 <C6 =D6 !>E6 5?F6 >@G6 XAI 4 j 6 f jJXU jKd2 jLd2 jM6 wjPeQQ S&8T{ T&"Uq(l2\VK V&"Wq(l2\X X&"Yq(l2\Z Z&"[q(l2\\ \&"]q(l2\^ ^&"_q(l2\`[ `&"aq(l2\b+ b&"cq(l2\d d&"eq(l2\f f&"gq(l2\h h&"iq(l2\jk j&"kq(l2\l; l&"mq(l2\n n&"oq(l2\p p&"qq(l2\r r&"sq(l2\t{ t&"uq(l2\vK v&"wq(l2\x x&"yq(l2\zz&"{q(l2\||&"}q(l2\~~&"q(l2\[&"q(l2\+&"q(l2\&"q(l2\&"q(l2\&"q(l2\k&"q(l2\;&"q(l2\ &"q(l2\&"q(l2\&"q(l2\{& "q(l2\J&!"q(l2\&""q(l2\&#"q(l2\}DiacritsnewdlghSessionApplication TextBox 142, 44, 12, 12, .Del Text 157, 46, 39, 8, "characters" Text 9, 60, 188, 8, "______________________________________________" TextBox 41, 71, 12, 12, .Del2 Text 57, 73, 67, 8, "characters and add" TextBox 130, 71, 52, 12, .Add2 TextBox 41, 85, 12, 12, .Del2J Text 57, 87, 94, 8, "characters after J/ and add" TextBox 151, 85, 36, 12, .Add2J OkButton 8, 100, 40, 14 CancelButton 52, 100, 40, 14 End Dialog Dim AddDel as AddDelete AD=Dialog(AddDel) If AD=0 Then Goto InitChoice AddD=AddDel.AddDel If (AddD="0" or AddD="1") and AddDel.Add="" Then MsgBox "You need to fill in the proper box" Goto AddDelete ElseIf (AddD="2" or AddD="3") and AddDel.Del="" Then MsgBox "You need to fill in the proper box" Goto AddDelete ElseIf AddD="4" and (AddDel.Add2="" or AddDel.Del2="") Then MsgBox "You need to fill in the proper boxes" Goto AddDelete ElseIf AddD="5" and (AddDel.Add2J="" or AddDel.Del2J="") Then MsgBox "You need to fill in the proper boxes" Goto AddDelete End If End If 'CS.Send chr(1)+"d"+chr(27)+"[B"+chr(27)+"[A"+chr(27)+"[A"+chr(27)+"[A" 'chr(27)+"[A" CS.Send chr(1)+"d" For adown = 1 to 10 CS.Send chr(27)+"[B" Next adown ' Wait for response from host. CS.Receive nTimeOut, "[?25h" z=1 WhichButton=1 Do Until WhichButton=0 Begin Dialog Barcodes 66, 37, "Barcode Entry" TextBox 2, 2, 60, 12, .BCode OkButton 2, 17, 28, 15, .OK CancelButton 33, 17, 29, 15, .Cancel End Dialog Dim BCodeDialog As Barcodes WhichButton=Dialog(BCodeDialog) If WhichButton=0 Then Goto SecondChoice ' done barcode$=BCodeDialog.BCode CS.Send barcode$+chr(13) ' CS.Receive nTimeout, "Note 2:" '"continue." CS.Receive nTimeout, chr(27) + "[?25h" CS.GetTextInRegion InvalidCheck$, 10, 11, 10, 30 If InStr(InvalidCheck$, "Invalid") > 0 Then CS.Send " " ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" MsgBox "Barcode " & barcode$ & " is not valid." Goto ClearField Elseif InStr(InvalidCheck$, "not found") > 0 Then CS.Send " " ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" MsgBox "Barcode " & barcode$ & " is not on file." Goto ClearField ' Else ' Goto SaveScreen End If CS.GetTextInRegion ATKey$, 5, 68, 5, 76 CS.GetTextInRegion CallNum$, 10, 20, 10, 67 CallNum$="1"+RTrim(CallNum$) CS.GetTextInRegion Cost$, 12, 59, 12, 70 Cost$=Trim(Cost$) If WkFmYN=0 Then 'Use Workform '*************************************************************** 'If only changing call numbers, and not using the built-in 'workform, comment out the following line CS.Send WkFm 'Insert changes to be made to the call number here. 'If you are changing call numbers but are using the built-in 'workform to do so, comment out these lines. If NB=1 Then Call NewBook(CallNum$) If LTPT=1 Then Call GenericChangeCallNum(CallNum$) 'End If 'If WkFmYN=1 Then Else CallNum$=Right(CallNum$, Len(CallNum$)-1) Select Case AddD Case 0 AddText$=AddDel.Add If Right(AddText$, 1)<>"/" Then AddText$=AddText$+"/" NewCall$=AddText$+CallNum$ Case 1 AddText$=AddDel.Add If Right(AddText$, 1)<>"/" Then AddText$=AddText$+"/" NewCall$="J/"+AddText$+Right(CallNum$, Len(CallNum$)-2) Case 2 NumDel=Val(AddDel.Del) NewCall$=Right(CallNum$, Len(CallNum$)-NumDel) Case 3 NumDel=Val(AddDel.Del) NewCall$="J/"+Right(CallNum$, Len(CallNum$)-(NumDel+2)) End Select DnArr$="" For DownArrows=1 to 4 DnArr$=DnArr$+chr(27)+"[B" 'Down Arrows Next DownArrows CS.Send DnArr$+chr(4) CS.Send NewCall$ ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" End If 'If Cost$="$0.00" then Msgbox "Cost needs to be added for " & ATKey$ & "." '*************************************************************** CS.Send chr(1) + "J" '[F10] CS.Receive nTimeOut, "[9;11H"+chr(27)+"[?25h" 'CS.Wait 2 CS.Send " " CS.Receive nTimeOut, "System" ' "[?25h" GoBack: CS.Send chr(1) + "C" '[F3] CS.Receive 10, "" ' "[?25l" ClearField: CS.Send chr(4) 'CTRL-D CS.Receive nTimeOut, "[?25h" 'CS.Receive 1, "[?25l" z=z+1 Loop Goto done 'ErrHand: ' If Erl=47 Then ' MsgBox barcode$ & " is not valid or does not exist." ' CS.Send " " ' CS.Receive nTimeOut, "[?25l" ' Resume ClearField ' ElseIf Erl=90 Then ' Resume Next ' Else ' MsgBox "Error(" & Erl & ") " & Err & ": " & Error$ ' Resume done ' End If done: end sub QXE}$ULPT#TNEW BOOKNEW J/NEW BOOKJ/NEWJ/[B [?25hLTP-T, LARGE TYPEJ/PARENT-TEACHER/,AddDel0AddDel1AddDel2AddDel3AddDel4AddDel5DelTextDel2Text Del2JText Del2J2TextAddDelAdd2Del2Add2JDel2JNewBookADOther NIK/NIKNGK/NGKYN CIRCULATINGNON CIRCULATINGOn Shelf/[Due Date]On Order/Checked Out On Display At Bindery In StorageWorkformBEnter data to be changed for all selected records; leave blank allfields that you want left aloneActive:Perm:Status:Call #:Format:Scat: Loan Cat:Cost: Shelf Status:Renew:Purge Protect:Local:Area:System: Intersystem: Date Added:Note 1:Note 2: Choose one Remove 'New'Add to/Delete from call numberOther special call num. change!Add to start of Adult call number"Add after 'J/' of Juv. call number&Delete from start of Adult call number%Delete after 'J/' of Juv. call numberDelete characterscharacters and addcharacters after 'J/'and addK___Active_Perm_ItemStatus_CallNumber_Format_Scat_LoanCat_Cost_ShelfStatus_Renew_PurgeProtect_Local_Area_Sys_InterSys_DateAdd_Note1_Note2_NewBookADOtherAddDel0AddDel1AddDel2AddDel3AddDel4AddDel5_Add_DelDelTextGroup3Del2Add2Del2TextDel2JDel2JTextAdd2JDel2J2TextOKCancel0b#You need to fill in the proper box./[C1You need to fill in the proper box with a number.%You need to fill in the proper boxes.$OFFLINEInitial Choice(Use Workform/Format Change/Add/Del./etc.Add to/Delete from Call Number__@WkFmYNWkFmYWkFmN Add or Delete.______________________________________________characters after J/ and addZ@AddDelADAddADAddJADDelADDelJADADADADJAdd_Del__Del2_Add2Del2J_Add2J__1"You need to fill in the proper box234$You need to fill in the proper boxes5d Barcode EntryBCodeOKCancelInvalidBarcode  is not valid. not found is not on file.J[9;11HSystemCE8_Eյ/I௾(v'Or5 VB#V F FVjzCSnTimeOut2Caller_NBookNewCall_DADnArrDownArrows_______V F 6FVfv (0CSnTimeOutCaller_CallerCheckCNStatus______NewCallplaceNC1NC2DADnArrDownArrows__ 2B______&@@@@"  .>N^n(~0"2BRbrNIKNGKYNShelfStatItemStatWhichButton_FieldsWkFm__NB__OtherstatArr____ClNm_AddDAddText_NumDeli___________WFCost)V F " (8HXhx" &6F" V (^n08@HPX`hCSnTimeOut_ChoiceDiaCDWkFmYNWkFm_NBLTPT_NBLTPT_AddDelADAddD__adown__zWhichButton_BCodeDialogbarcodeInvalidCheck___ATKeyCallNumCostAddTextNewCall_NumDelDnArrDownArrows__NewBookGenericChangeCallNumDlgWorkFormWorkFormmain5F FmK+Passport ~u2\[< 8ih  f Giޜi5. i5. i5. i5.# 6!66, f Gi6, f Gi645.+ f Gi?6-5.+ f GiF F7fjVFcjz;l5.0ifjzql2\5q2\5q 5.;2\CD~u2\[< 8ih  f GiޜqO2\Ki5.V 65.[FVfvl i5.+65aFVfvl , 45.f f Gi!65.[FVfvl< f i 7(ީi  6 f 2 f i( 7(5.s (P65.FVfvli- 70jc:0F6lV5.0fv0iq0F6lV2\5q2\5| I8r5 j5 j5 j5 j5 j5 j5ǩ j5ѩ j5ܩ j5 j5 j5 j6 j6 j6 j6 j5 {66) 6. 5 j5 j5 j5 j5 j5 j5ǩ j5ѩ j5ܩ j5 j5 j5 j6 j6 j6 j6 j 6)6 6. 6) 75 j5 j5 j5 j5 j5 j5ǩ j5ѩ j5ܩ j5 j5 5*2BW5 j5 5*2BW5 j5 76 j6 jO5 06 j6 jh5 j5 j5 j5 j5 j5 j5ǩ j5ѩ j5ܩ j5 j5 j5 j6 j6 j6 j6 j6.6 6) 5 j5 j5 j5 j5 j5 j5ǩ j5ѩ j5ܩ j5 j5 j5 j6 j6 j6 j6 j55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j55 5 5 5 5 5 5 j5 j6 j6 j6 j6 jS55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j&55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j8#"666:6D666N6R666V6d666v6666 dȓj  6 j ɚ 6 j Z 6 j  6< j ".( j Q 6F j d.( j  6N j '< j & 6X j "$ j 6 6b j "4 j o6 6l j 4 j F! 6t j "D j oF 6 j D &j WX* 6 j TB( .j f 6 j "d( 0j Rf/ 6 j d( 2j v 6 j "t( 4j ;v 6 j Nt( 6j gv 6 j t( 8j v' 6 j t( :j X) 6 j (  ~j  C 6  j  j  E 6! j  > j  69 j >( j r( j6C jl8p8 e7llclplcl7&667  R"6:6D(l 50R"6:6D(l 50l 50l 6FDl 50 l l .l >50N^(l 507w f 0t"(0innl n nr~t~v~_x~=z~| ~~~76(j~0(0i606(0~Ml6l .6>N0^(0l0l .n76(jh 6(jqjc*nl ni~Gl6l .6>Nn ^ne77W6(jh 6(j@jc*nl ni0nl 0.l >nL977W6(jgh 6(j'jc"2*nl ni"20l6l .6>Nn ^l B0Rbrl nn l 50&7)(&i(l 50.7"(.il 5067)(6i(l 50>7b(>i6$!6$>(> l 50FF81l 6Vy1l 6d9*l 6(l 50HRH"6N6R(l 50JRJ"6N6R(l 50LRL"6N6R(l 50NRN"6N6R(l 50PRP"6N6R(l 50RRR"6N6R(l 50T7.l T(l 50\7Il \.l >50N^(l 50d7Il d.l >50N^(l 50\~u2\[ < 8 - j 62 j( j( j 6Cjr 6nj6je ((H8 87H !H8lX!hH8l8l8"HXlx"HXl#$( ' v j 6 j()t 6\j*v 6j+( 6j,5~ 6j-H! 6j.V! 6j/? j0 6 j1, j2.' 6 j3< 6 j4)G j59IC 6ChangeByCallNum.SRC(hChangeByCallNum.DES('ChangeByCallNum.BIN(wVGoBack.SRC T' MacroName: ChangeByCallNumber ' MacroDescription: Make changes to a list of item records gotten via a call number search. '$Include: "PLUSUTIL!ChangeSubs" sub main dim CS as session set CS = CurrentSession Dim nTimeOut as Integer ' The default timeout for each command is 1 minute. ' Increase this value if your host requires more time ' for each command. nTimeOut = 60 InitChoice: Begin Dialog ChoiceDialog 211, 45, "Initial Choice" OkButton 164, 8, 40, 14 CancelButton 164, 24, 40, 14 OptionGroup .WkFmYN OptionButton 8, 12, 156, 10, "Use Workform/Format Change/Add/Del./etc.", .WkFmY OptionButton 8, 24, 134, 10, "Add to/Delete from Call Number only", .WkFmN End Dialog Dim ChoiceDia As ChoiceDialog CD=Dialog(ChoiceDia) If CD=0 Then Goto done WkFmYN=ChoiceDia.WkFmYN SecondChoice: If WkFmYN=0 Then 'If only changing call numbers, but not using the built-in 'workform to do so, comment out the following two lines. WkFm=WorkForm If WkFm="" Then Goto done NBLTPT=Left(WkFm, 2) : WkFm=Right(WkFm, Len(WkFm)-2) NB=Left(NBLTPT, 1) : LTPT=Right(NBLTPT, 1) WkFm=chr(9)+WkFm End If If WkFmYN=1 Then 'Don't use workform AddDelete: Begin Dialog AddDelete 197, 118, "Add or Delete" OptionGroup .AddDel OptionButton 9, 4, 116, 10, "Add to start of Adult call number", .ADAdd OptionButton 9, 19, 118, 10, "Add after 'J/' of Juv. call number", .ADAddJ OptionButton 9, 40, 132, 10, "Delete from start of Adult call number", .ADDel OptionButton 8, 53, 126, 10, "Delete after 'J/' of Juv. call number", .ADDelJ OptionButton 8, 72, 33, 10, "Delete", .ADAD OptionButton 8, 86, 33, 10, "Delete", .ADADJ TextBox 127, 11, 63, 12, .Add Text 9, 28, 188, 8, "______________________________________________" TextBox 142, 44, 12, 12, .Del Text 157, 46, 39, 8, "characters" Text 9, 60, 188, 8, "______________________________________________" TextBox 41, 71, 12, 12, .Del2 Text 57, 73, 67, 8, "characters and add" TextBox 130, 71, 52, 12, .Add2 TextBox 41, 85, 12, 12, .Del2J Text 57, 87, 94, 8, "characters after J/ and add" TextBox 151, 85, 36, 12, .Add2J OkButton 8, 100, 40, 14 CancelButton 52, 100, 40, 14 End Dialog Dim AddDel as AddDelete AD=Dialog(AddDel) If AD=0 Then Goto InitChoice AddD=AddDel.AddDel If (AddD="0" or AddD="1") and AddDel.Add="" Then MsgBox "You need to fill in the proper box" Goto AddDelete ElseIf (AddD="2" or AddD="3") and AddDel.Del="" Then MsgBox "You need to fill in the proper box" Goto AddDelete ElseIf AddD="4" and (AddDel.Add2="" or AddDel.Del2="") Then MsgBox "You need to fill in the proper boxes" Goto AddDelete ElseIf AddD="5" and (AddDel.Add2J="" or AddDel.Del2J="") Then MsgBox "You need to fill in the proper boxes" Goto AddDelete End If End If CS.GetTextInRegion RecNums$, 2, 50, 2, 78 place=Instr(RecNums$, "Records") RecNums$=Right(RecNums$, Len(RecNums$)-place) place2=Instr(RecNums$, "of") CurrRec=Val(Mid(RecNums$, 7, place2-7)) TotalRecs=Val(Mid(RecNums$, place2+2, Len(RecNums$)-place2)) HM$=" Enter the total number of records to change, starting with " HM$=HM$+"the current record." ThirdChoice: Begin Dialog ChangeRecs 126,57,"How Many?" TextBox 4,40,20,12,.HowMany Text 4,4,120,32,HM$ OKButton 28,40,32,12 CancelButton 64,40,32,12 End Dialog Dim HowMany as ChangeRecs HowMany.HowMany=CStr(TotalRecs-CurrRec+1) HMy=Dialog(HowMany) If HMy=0 Then Goto SecondChoice HMany$=HowMany.HowMany If HMany$="0" Then Goto Done Else howm=Val(HMany$) If howm=0 Then MsgBox "Data must be a number" Goto ThirdChoice 'ElseIf TotalRecs"/" Then AddText$=AddText$+"/" NewCall$=AddText$+CallNum$ Case 1 AddText$=AddDel.Add If Right(AddText$, 1)<>"/" Then AddText$=AddText$+"/" NewCall$="J/"+AddText$+Right(CallNum$, Len(CallNum$)-2) Case 2 NumDel=Val(AddDel.Del) NewCall$=Right(CallNum$, Len(CallNum$)-NumDel) Case 3 NumDel=Val(AddDel.Del) NewCall$="J/"+Right(CallNum$, Len(CallNum$)-(NumDel+2)) Case 4 NumDel=Val(AddDel.Del2) NewCall$=Right(CallNum$, Len(CallNum$)-NumDel) AddText$=AddDel.Add2 'If Right(AddText$, 1)<>"/" Then AddText$=AddText$+"/" NewCall$=AddText$+NewCall$ Case 5 NumDel=Val(AddDel.Del2J) NewCall$=Right(CallNum$, Len(CallNum$)-(NumDel+2)) AddText$=AddDel.Add2J 'If Right(AddText$, 1)<>"/" Then AddText$=AddText$+"/" NewCall$="J/"+AddText$+NewCall$ End Select If Len(NewCall$)>48 Then NewCall$=Left(NewCall$, 48) DnArr$="" For DownArrows=1 to 5 '4 DnArr$=DnArr$+chr(27)+"[B" 'Down Arrows Next DownArrows CS.Send DnArr$+chr(4) CS.Send NewCall$ ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" End If 'If Cost$="$0.00" then Msgbox "Cost needs to be added for " & ATKey$ & "." '*************************************************************** 'CS.Wait 1 CS.Send chr(1) + "J" '[F10] CS.Receive nTimeOut, "[9;11H"+chr(27)+"[?25h" 'CS.Wait 2 CS.Send " " CS.Receive nTimeOut, "System" ' "[?25h" GoNext: If z<((TotalRecs-CurrRec)+2)-1 then CS.Send chr(1) + "H" '[F8] CS.Receive nTimeOut, "[?25h" end if z=z+1 Loop Until z=((TotalRecs-CurrRec)+2) MsgBox "Done!" done: end sub EQ $!YwRV#VNEW BOOKNEW J/NEW BOOKJ/NEWJ/[B [?25hLTP-T, LARGE TYPEJ/PARENT-TEACHER/,AddDel0AddDel1AddDel2AddDel3AddDel4AddDel5DelTextDel2Text Del2JText Del2J2TextAddDelAdd2Del2Add2JDel2JNewBookADOther NIK/NIKNGK/NGKYN CIRCULATINGNON CIRCULATINGOn Shelf/[Due Date]On Order/Checked Out On Display At Bindery In StorageWorkformBEnter data to be changed for all selected records; leave blank allfields that you want left aloneActive:Perm:Status:Call #:Format:Scat: Loan Cat:Cost: Shelf Status:Renew:Purge Protect:Local:Area:System: Intersystem: Date Added:Note 1:Note 2: Choose one Remove 'New'Add to/Delete from call numberOther special call num. change!Add to start of Adult call number"Add after 'J/' of Juv. call number&Delete from start of Adult call number%Delete after 'J/' of Juv. call numberDelete characterscharacters and addcharacters after 'J/'and addK___Active_Perm_ItemStatus_CallNumber_Format_Scat_LoanCat_Cost_ShelfStatus_Renew_PurgeProtect_Local_Area_Sys_InterSys_DateAdd_Note1_Note2_NewBookADOtherAddDel0AddDel1AddDel2AddDel3AddDel4AddDel5_Add_DelDelTextGroup3Del2Add2Del2TextDel2JDel2JTextAdd2JDel2J2TextOKCancel0b#You need to fill in the proper box./[C1You need to fill in the proper box with a number.%You need to fill in the proper boxes.$OFFLINEInitial Choice(Use Workform/Format Change/Add/Del./etc.#Add to/Delete from Call Number only__@WkFmYNWkFmYWkFmN Add or Delete.______________________________________________characters after J/ and addZ@AddDelADAddADAddJADDelADDelJADADADADJAdd_Del__Del2_Add2Del2J_Add2J__1"You need to fill in the proper box234$You need to fill in the proper boxes5Recordsof= Enter the total number of records to change, starting with the current record. How Many?HowMany___Data must be a numberThere are only  records left in the list!eJ[9;11HSystemHDone!EE8_Eյ/௾(vf(Or5B#V F FVjzCSnTimeOut2Caller_NBookNewCall_DADnArrDownArrows_______V F 6FVfv (0CSnTimeOutCaller_CallerCheckCNStatus______NewCallplaceNC1NC2DADnArrDownArrows__ 2B______&@@@@"  CoM.>N^n(~0"2BRbrNIKNGKYNShelfStatItemStatWhichButton_FieldsWkFm__NB__OtherstatArr____ClNm_AddDAddText_NumDeli___________WFCost,V F " (8HXhx" "2 BR("0 bj8z@HPX`hpCSnTimeOut_ChoiceDiaCDWkFmYNWkFm_NBLTPT_NBLTPT_AddDelADAddD_RecNums___placeplace2_CurrRecTotalRecsHM_HowManyHMyHManyhowm_zATKeyCallNumCostAddTextNewCallNumDelDnArrDownArrows__NewBookGenericChangeCallNumDlgWorkFormWorkFormmain5F FmK+Passport ~u2\[< 8ih  f Giޜi5. i5. i5. i5.# 6!66, f Gi6, f Gi645.+ f Gi?6-5.+ f GiF F7fjVFcjz;l5.0ifjzql2\5q2\5q 5.;2\CD~u2\[< 8ih  f GiޜqO2\Ki5.V 65.[FVfvl i5.+65aFVfvl , 45.f f Gi!65.[FVfvl< f i 7(ީi  6 f 2 f i( 7(5.s (P65.FVfvli- 70jc:0F6lV5.0fv0iq0F6lV2\5q2\5| I8r5 j5 j5 j5 j5 j5 j5ǩ j5ѩ j5ܩ j5 j5 j5 j6 j6 j6 j6 j5 {66) 6. 5 j5 j5 j5 j5 j5 j5ǩ j5ѩ j5ܩ j5 j5 j5 j6 j6 j6 j6 j 6)6 6. 6) 75 j5 j5 j5 j5 j5 j5ǩ j5ѩ j5ܩ j5 j5 5*2BW5 j5 5*2BW5 j5 76 j6 jO5 06 j6 jh5 j5 j5 j5 j5 j5 j5ǩ j5ѩ j5ܩ j5 j5 j5 j6 j6 j6 j6 j6.6 6) 5 j5 j5 j5 j5 j5 j5ǩ j5ѩ j5ܩ j5 j5 j5 j6 j6 j6 j6 j55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j55 5 5 5 5 5 5 j5 j6 j6 j6 j6 jS55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j&55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j8#"666:6D666N6R666V6d666v6666 dȓj  6 j ɚ 6 j Z 6 j  6< j ".( j Q 6F j d.( j  6N j '< j & 6X j "$ j 6 6b j "4 j o6 6l j 4 j F! 6t j "D j oF 6 j D &j WX* 6 j TB( .j f 6 j "d( 0j Rf/ 6 j d( 2j v 6 j "t( 4j ;v 6 j Nt( 6j gv 6 j t( 8j v' 6 j t( :j X) 6 j (his value if your host requires more time ' for each command. nTimeOut = 180 CS.GetTextInRegion ScnText, 2, 65, 2, 79 place=InStr(ScnText, " of ") j=1 Do while j<=place If Mid(ScnText, j, 1) Like "[0-9]" Then place2=j Exit Do End If j=j+1 Loop CurrRec=Val(Mid(ScnText, place2, place-place2)) DoDialog: Begin Dialog UserDialog 171, 45, "Go Back" Text 3, 7, 122, 8, "Type the number of times to go back:" TextBox 128, 6, 36, 12, .Num OkButton 80, 24, 40, 14 CancelButton 124, 24, 40, 14 End Dialog Dim Recs as UserDialog Recs.Num=CurrRec z = Dialog(Recs) If z = 0 Then Goto Done a$=Recs.Num i=1 : alph=0 Do If Mid(a$, i, 1) Like "[!0-9]" Then alph=1 Exit Do End If i=i+1 Loop While i<=Len(a$) If (alph=1 or a$="") Then MsgBox "Only numbers, please." Goto DoDialog End If total=Val(Recs.Num) If total>CurrRec-1 Then total=CurrRec-1 curr=1 Do While curr<=total CS.Send chr(1) + "I" ' Wait for response from host. CS.Receive nTimeOut, chr(27) + "[?25h" curr=curr+1 Loop MsgBox "Done!"Go back (F9) a certain number of records or items Done: End Sub YQ$5F.t#x of [0-9]Go Back$TypeGoBack.DES1GoBack.BIN GoForward.SRC$>}GoForward.DES4 the number of times to go back: _Num__[!0-9]Only numbers, please.I [?25hDone!FY#V F 6FVfv" CSnTimeOutScnText_____placejplace2CurrRec_Recszaialph_totalcurrmain5F FmK+Passport8~u2\[  8qAO2\5.6FVlfvvfXv6l5.Flvv vf6lh  - j 5. jz 5.) j$ jP( j|( j 5.Pj"#e$$%&&'(i5.^6l)*1+, - f .7/5.gj0513h 4467m8ql5.6F2\;q l5.6F2\< =?5.jB; )u1NumUserDialog?Sessio' MacroName: GoForward ' MacroDescription: Go Forward (F8) a certain number of records or items Sub main ' Go forward (F8) a certain number of records or items Dim CS as session Set CS = CurrentSession Dim nTimeOut as Integer nTimeOut = 180 CS.GetTextInRegion ScnText, 2, 65, 2, 80 place=InStr(ScnText, " of ") j=1 Do while j<=place If Mid(ScnText, j, 1) Like "[0-9]" Then place2=j Exit Do End If j=j+1 Loop CurrRec=Val(Mid(ScnText, place2, place-place2)) 'EndRec=Val(Right(ScnText, Len(ScnText)-place-3)) EndRec=Val(Mid(ScnText, place+3, Len(ScnText)-place-2)) DoDialog: Begin Dialog UserDialog 180, 45, "Go Forward" Text 4, 8, 130, 8, "Type the number of times to go forward:" TextBox 137, 6, 36, 12, .Num OkButton 89, 24, 40, 14 CancelButton 133, 24, 40, 14 End Dialog Dim Recs as UserDialog Recs.Num = EndRec - CurrRec z = Dialog(Recs) If z = 0 Then Goto Done a$=Recs.Num i=1 : alph=0 Do If Mid(a$, i, 1) Like "[!0-9]" Then alph=1 Exit Do End If i=i+1 Loop While i<=Len(a$) If (alph=1 or a$="") Then MsgBox "Only numbers, please." Goto DoDialog End If total=Val(Recs.Num) If total>EndRec-CurrRec Then total=EndRec-CurrRec curr=1 Do While curr<=total CS.Send chr(1) + "H" ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" curr=curr+1 Loop Set LockStep = Nothing MsgBox "Done!" Done: End Sub Go Forward (F8) a certain number of records or itemsQ7=$[F# of [0-9] Go Forward'Type the number of times to go forward: _Num__[!0-9]Only numbers, please.H [?25hDone!D1#V F GoForward.BIN#GoToStartOfLine.SRC(&6:GoToStartOfLine.DES( >GoToStartOfLine.BIN(% (6FVfv" CSnTimeOutScnText_____placejplace2CurrRecEndRec_Recszaialph_totalcurrLockStepmain5F FmK+PassportX~u2\[ 8 qAP2\ 5.6FVlf v vfX v6l5.Flvv vf6lh F6lff Vlh  - j 5. j 5., j$ jY( j( j5.Vj e!!"##$%i5.d6l&'1() * f +7,5.mj-/.0h 1134m5ql5.6F2\8q l5.6F2\9 :< +=5.j@; )u1NumUserDialog?SessionApplication    !"#$%&'()*+,-.023456789:;<=>?@ABCDFGHIJKLMNOPQRSTUVWXYZ[\]^_`cbdeghijklmnopqrstuvwxyz{|' MacroName: GoToStartOfLine ' MacroDescription: Move the cursor to the start of a line of text in a CLSI field Sub main Dim CS as Session Set CS=CurrentSession CurRow=CS.CursorRow CurCol=CS.CursorColumn InData="" i=2 Do Until (InData=" ") or (CurCol-i=1) 'InData=Session.ScreenText(CurRow, CurCol-i, 1, 2) CS.GetTextInRegion InData, CurRow, CurCol-i, CurRow, (CurCol-i)+1 'MsgBox "/" & InData & "/" i=i+1 Loop i=i-1 If i>2 Then For j=1 to (i-2) CS.Send chr(27)+"[D" Next j End If End Sub Move the cursor to the start of a line of text in a CLSI fielduQ*{&,$Q# [D uu# V F ,<LdtCSCurRowCurColInData_i__j___main5F FmK+Passport ~u2\[q2\ q2\ 7<,L,5\<Lg q, L L <2\d, L <L sLLLXjtLc3q<l5\d2\$i SessionApplication' MacroName: MarcReturn ' MacroDescription: Return from a recorMarcReturn.SRC9MarcReturn.DES/ZMarcReturn.BIN7)1MarcSwitch.SRC,4Ed called up by MarcSwitch to the original item in a call number search. Sub main ' After using MarcSwitch to switch from an item record in a ' call number search to the corresponding MARC record, use ' the data written out to switch back to the original point ' in the call number search. Dim CS as Session Set CS=CurrentSession Dim nTimeOut as Integer ' The default timeout for each command is 1 minute. ' Increase this value if your host requires more time ' for each command. nTimeOut = 60 filename$="C:\clsi\MarcSwch.dat" filenum%=FreeFile Open filename$ For Input as filenum% Line Input #filenum%, retrn$ Close filenum% RecNum$=GetField(retrn$, 1, ";") SearchStr$=GetField(retrn$, 2, ";") CS.Send chr(1) + "d" '[S-F4] ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" CS.Send chr(27)+"[B"+chr(27)+"[A"+chr(27)+"[A" '+chr(27)+"[A" ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" CS.Send SearchStr$+chr(13) ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" TotalRecs = Val(RecNum$)-1 CurrRec = 1 Do Until CurrRec>TotalRecs CS.Send chr(1)+"H" '[F8] ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" CurrRec = CurrRec + 1 Loop MsgBox "Arrived!" End Sub Return from a record called up by MarcSwitch to the original item in a call number search.QS$#C:\clsi\MarcSwch.dat;d [?25h[B[AHArrived!6#V F  ((8HXpCSnTimeOutfilenamefilenumretrnRecNum__SearchStr___________TotalRecsCurrRecmainF FmK+PassportB~u2\[< 85eA8jCjjOjIj>5 i5 i(ql5 (82\$q l5*(82\2ql5:(8Hl X5h?pl 5?2\$ q l5*(82\2"q((l82\$%q l5*(82\2'h ?I()m*ql5D(82\$,q l5*(82\2- .05Hj2 SessionApplication' MacroName: MarcSwitch ' MacroDescription: Switch from an item record in a call number search to the corresponding MARC record. Sub main Dim CS as Session Set CS=CurrentSession Dim nTimeOut as Integer ' The default timeout for each command is 1 minute. ' Increase this value if your host requires more time ' for each command. nTimeOut = 60 On Error Resume Next path$ = CurDir$ ChDir "C:\CLSI" If Err = 76 Then 'Path not found Err = 0 MkDir "C:\CLSI" End If ChDir path$ On Error Goto 0 CS.GetTextInRegion WhereAreWe$, 3, 21, 3, 62 WhereAreWe$ = Trim(WhereAreWe$) If InStr(WhereAreWe$, "Call Number")=0 Then MsgBox "You are not viewing the results of a call number search. Exiting..." Goto Done End If CS.GetTextInRegion RecNum$, 2, 50, 2, 78 numplace = InStr(1, RecNum$, "Record", 0) numplace2 = InStr(numplace+8, RecNum$, "of", 0) RecNum$ = Mid(RecNum$, numplace+8, numplace2 - (numplace+9)) CS.GetTextInRegion ATKey$, 5, 61, 5, 76 ATKey$ = Trim(ATKey$) If InStr(1, ATKey$, " ")>4 Then ATKey$ = Left(ATKey$, 9) CS.Send Chr(1)+"C" '[F3] ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" CS.GetTextInRegion SearchStr$, 19, 21, 19, 48 SearchStr$ = Trim(SearchStr$) filename$ = "C:\clsi\MarcSwch.dat" filenum% = FreeFile Open filename$ for Output as filenum% retrn$ = RecNum$+";"+SearchStr$ Print #filenum%, retrn$ Close filenum% CS.Send Chr(1)+"d" '[S-F4] ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" CS.Send ATKey$+Chr(13) ' Wait for response from host. CS.Receive nTimeoSwitch from an item record in a call number search to the corresponding MARC record.ut, chr(27) + "[?25h" CS.Send Chr(13) CS.Send Chr(1)+"g" '[S-F7] ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" Done: End Sub Q?E$c#C:\CLSI Call NumberDYou aMarcSwitch.DES-aTMarcSwitch.BINfChangeSubs.SRCILChangeSubs.DES0.~6re not viewing the results of a call number search. Exiting...Recordof C [?25hC:\clsi\MarcSwch.dat;dgI#V F &6FVfv (08@CSnTimeOutpath_WhereAreWe_____RecNumnumplace_numplace2_ATKeySearchStrfilenamefilenumretrnmain5F FmK+Passport ~u2\[ < 8  i7 5j4eaLjb5j;j4q>2\i5&6FVl5(jq2N2\5o&6FVlf&5x6FVvf l f &f  i!q(=L2\"(i(#5}&6(FVl#(i(%ql5&62\(q l5&62\*q002\+0i0-58.eA8/"8jC050 @1jP@jWjQ2j>4ql5&62\7q llicationSubroutines to be included in ChangeBySomething macrosnApplicationTake a file of Last System Copy ATKeys, delete the CCS records, and make a file of the "deleted" OCLC numbersQ<X^$|P ?#CC:\clsi\lastsys.txt  [?25h(| There are no satisfiers for this | There are no satisfiers for this 0000gGO1 continue.d000\r"This record is currently locked by001Fix meclsocm010 G:\DELETE.TXT  O #V F&6 FTdt (08@ HPX,CSfilenamefilenumlenfilenumrecsposKeyIn_____CheckScreen_______SysCopiesLocCopiesSysOrdersLocOrdersVolumesCheckTagOCLCNumiCheckLNfilename2filenum2main5F FmK+Passport 2~u2\[5 eA8 f & jC66& m86jFF9m<jjF 5 I qF dTl t2\*q5 02\8qO2\@T5 Kdtl5vl1q5 2\*q5 02\8_q &.2\@q(&.2\@q0GO2\@q8GO2\@ i  (i(!0i0"8i8# 5 (5U05U86U$TF dtl5 D%qTl5 dt2\*&q5 02\8'=)qTl5 dt2\**q5 02\8,qTl5 dt2\*-q5 2\8.q5 5  5/ 5: q2\G SessionApplication2\*/q5 2\80q5 2\*1q5 02\82qTl5 dt2\*3q5 02\84qTF dtl5 2\*5q5 02\86q@&.2\@7q0GO2\@8q8GO2\@9@i@:0i0;8i8<@5 05U85U-=qTl5 dt2\*>@ABDq52\$ q5*2\ q52\$ q562\ q52\$ SessionApplication5&62\9q(&l62\ql2\Q@hn$4 K #O xxxmarc MARC ONLINE Copy List Full TitleIPlease trigger macro from either brief records list or MARC Edit display. Brief Titles CCS!ShiftF7 [?25h\x09 [?25lLineof[B[CPRELIMINARY DATAOVERST\x1B[K[A999 aPRELIMINARY DATA J}o#"V F (08@ 0@P`pHPX,<`AgencyCSnTimeOut_Today0Today1Today2_Today3TodayMarcTest_____cccc19LinNumsplaceplace2CurLinTotalLines__i__CursRowPrelimDatInsOvr___main5 F FmK+Passport "5~u2\ [ 8i(ii (i0 0(8q@;2ChangeSubs.BIN dARecordMarc.SRCU<RecordMarc.BINr MonthlyScatToExcel.SRC.5A8\@i@5 0@@Pl5( 0@@Pl;54 0@@Pl 5Aj!"a"5 0@@Pl2#u52\%q52\&'()-q2\`.p/`R0p1q5ũ2\2q5ҩ2\3q2\`48qHP2\95 0H@Pl: Hf HiH;5 0H@Pl<H(ih = Hf  H(ih A|BCql5 02\Dql5 02\E FGJql l 0@l Pl 2\Rjc3Sql5 02\TiUql5 02\Zq2\[qP*2\\P5]qXFK2\^X6@_q62\`ql5 02\abql6 0@l Pl 6$,<2\cfq686$8(8`2\gql5 02\jql6< 02\kql5 02\x SessionApplicationQ?$I ` #d /J [?25h 1999 01/01/1965 01/01/1970 01/01/1975 01/01/1978 01/01/1980 01/01/1982 01/01/1983 01/01/1985 01/01/1988 01/01/1989 01/01/1990 01/01/1991 01/01/1992 01/01/1994 01/01/1995 01/01/1996 01/01/1997 01/01/1998 01/01/1999[AX #V F  F (,<0L\l|SessionCSnTimeOutBarcode___BcNumDateAddOldCurrDatexposyposDateAdd_____main5F FmK+Passport ~u2\[~u2\[ 8Sq &2\TiiVh Xq  :C2\Y i Zi(([(5$jw\(5$jw]q 2\,^q 2\<_ i7`q0\Lll5$|2\"aq Ll5$(\l2\0bq5$82\"cq Ll5$(\l2\0deq Ll5$(\l2\0fgh,<iq0\Lll5$|2\"jq Ll5$(\l2\0kq5$82\"lq Ll5$(\l2\0mnq Ll5$(\l2\0opq (qr i5$< ih @U rs ih <@qstwx;xy5$C0z z1{5$P0||Z_ydm[= }5$]0~ ~z~5$j0FY5$w0sy5$035$02E<5$0  5$0Y`c^nr@         R !"#$&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQSTUVWXYZ[\]^_`abcdehijklmnopqrstuvwxyz{|}~5$0  5$0  5$0[  5$0%  >5$0 ? W5$0 X 6$0  6$0I  6$ 06$-0qLl6$:\l2\"qLl6$:\l2\"qLl6$:\l2\"q Ll5$(\l2\0q0\Lll5$|2\"q Ll5$(\l2\0q5$82\"q Ll5$(\l2\0q Ll5$(\l2\0 SessionApplication' MacroName: BatchChangeByCallNum_Advncd ' MacroDescription: Make advanced changes to items retrieved by a call number search ' Written by: Joel Hahn, Niles Public Library District sub main Dim Session as Session Set Session = CurrentSession Dim CS as Session Set CS = CurrentSession Dim nContinue as Integer Dim nTimeOut as Integer ' The d<2\@ET5 dtlGq5 2\*HcIKq 2\@Get the Monthly Statistics by Item Scat report, and push the data into an Excel spreadsheetQD!)}   ##1######Khttp://ccs1.ccs.nsls.lib.il.us:8080/cgi-bin/private/arcrptfile?rpt=s12&agy=&day=01&auth=InternetExplorer.Application visibleMicrosoft Internet ExplorerC:\My Documents\mscat.txt navigateA readystate%fa {TAB}t{ENTER}##2quitExcel.Application workbooksaddScatrangeAvalueA1 CheckoutsB1RenewalsC1Total %D1E1H2H1[0-9]A'BCTOTALS: =SUM(B2:B) =SUM(C2:CD=B/B*100E=C/CsheetsAselectSheet2sheetsAnameSheet1#%V (0 FAdd "###marc" and today's date to a bib. record's 999 line8@&6HPXF VFdfv`hpxRecordMarc.DES21%:MonthlyScatToExcel.DES.[MonthlyScatToExcel.BIN.S3 LastSystem.SRCA='MacroName: ChangeSubs 'MacroDescription: Subroutines to be included in ChangeBySomething macros Declare Sub NewBook(CallNum$) Declare Sub GenericChangeCallNum(CallNum$) Declare Function WorkForm() Declare Function DlgWorkForm( WhichControl$, action%, suppvalue& ) 'Sub Main 'CurrentSession.GetTextInRegion CallNum$, 10, 20, 10, 69 'CallNum$="3"+Trim(CallNum$) 'GenericChangeCallNum(CallNum$) 'wkfmxx = Workform() 'End Sub Sub NewBook(CallNum$) Dim CS as Session Set CS=CurrentSession Dim nTimeOut2 as Integer nTimeOut2 = 60 Caller=Val(Left(CallNum$, 1)) CallNum$=Right(CallNum$, Len(CallNum$)-1) NBook=0 If Left(CallNum$, 8)="NEW BOOK" Then NBook=1 If NBook<>1 and Left(CallNum$, 3)="NEW" then NBook=2 If Left(CallNum$, 10)="J/NEW BOOK" Then NBook=3 If NBook<>3 and Left(CallNum$, 5)="J/NEW" Then NBook=4 Select Case NBook Case 0 'Msgbox "Not a new book. Format, Loan Cat and Hold indicators replaced anyway." Goto SubReturn Case 1 NewCall$=Right(CallNum$, Len(CallNum$)-9) Case 2 NewCall$=Right(CallNum$, Len(CallNum$)-4) Case 3 NewCall$="J/"+Right(CallNum$, Len(CallNum$)-11) Case 4 NewCall$="J/"+Right(CallNum$, Len(CallNum$)-6) End Select DA=4 'sometimes 5 If Caller=3 Then DA=5 'sometimes 6 DnArr$="" For DownArrows=1 to DA DnArr$=DnArr$+chr(27)+"[B" 'Down Arrows Next DownArrows CS.Send DnArr$+chr(4) CS.Send NewCall$ ' Wait for response from host. CS.Receive nTimeOut2, "[?25h" SubReturn: End Sub '*************************************************************** Sub GenericChangeCallNum(CallNum$) Dim CS as Session Set CS=CurrentSession Dim nTimeOut as Integer nTimeOut = 60 Caller=Val(Left(CallNum$, 1)) CallNum$=Right(CallNum$, Len(CallNum$)-1) CS.GetTextInRegion CallerCheck$, 3, 1, 3, 79 'If InStr(1, CallerCheck$, "BIB/ITEM MAINTENANCE - Call Number Search") Then ' Caller=3 'End If CNStatus=0 If Left(CallNum$, 2)="LT" Then CNStatus=1 If (InStr(CallNum$, "P-T")) Then CNStatus=2 If (Left(CallNum$, 2)="J/") and (InStr(CallNum$, ", ")) Then CNStatus=3 'If Left(CallNum$, 3)="SF/" Then CNStatus=4 'If Left(CallNum$, 12)="CLIFFS NOTES" Then CNStatus=5 Select Case CNStatus Case 0 'NewCall$="STORAGE/"+CallNum$ 'MsgBox "Nothing to change found; macro will save record and go on to next." Goto SubReturn Case 1 NewCall$="LARGE TYPE"+Right(CallNum$, Len(CallNum$)-2) Case 2 place=InStr(1, CallNum$, "P-T") If place=3 then NC1$=Right(CallNum$, Len(CallNum$)-place-3) NC2$="" Else NC1$=Mid(CallNum$, 3, place-4) If place+3<>Len(CallNum$) Then NC2$=Right(CallNum$, Len(CallNum$)-place-2) Else NC2$="" End If End If NewCall$="J/PARENT-TEACHER/"+NC1$+NC2$ Case 3 place=InStr(1, CallNum$, ",") NewCall$=Left(CallNum$, place-1) Case 4 'NewCall$="SCIENCE FICTION/"+Right(CallNum$, Len(CallNum$)-3) Case 5 'NewCall$="CLIFF NOTES/"+Right(CallNum$, Len(CallNum$)-13) End Select DA=4 'sometimes 5 If Caller=3 Then DA=5 'sometimes 6 DnArr$="" For DownArrows=1 to DA DnArr$=DnArr$+chr(27)+"[B" 'Down Arrows Next DownArrows CS.Send DnArr$+chr(4) CS.Send NewCall$ ' Wait for response from host. 'CS.Receive nTimeOut3, "[?25h" SubReturn: End Sub '*************************************************************** Function DlgWorkForm( WhichControl$, action%, suppvalue& ) Select Case action% Case 1 DlgEnable "AddDel0", 0 DlgEnable "AddDel1", 0 DlgEnable "AddDel2", 0 DlgEnable "AddDel3", 0 DlgEnable "AddDel4", 0 DlgEnable "AddDel5", 0 DlgEnable "DelText", 0 DlgEnable "Del2Text", 0 DlgEnable "Del2JText", 0 DlgEnable "Del2J2Text", 0 DlgEnable "Add", 0 DlgEnable "Del", 0 DlgEnable "Add2", 0 DlgEnable "Del2", 0 DlgEnable "Add2J", 0 DlgEnable "Del2J", 0 DlgValue "AddDel0", 1 Case 2 Select Case WhichControl$ Case "NewBook" DlgValue "AD", 0 DlgValue "Other", 0 DlgEnable "AddDel0", 0 DlgEnable "AddDel1", 0 DlgEnable "AddDel2", 0 DlgEnable "AddDel3", 0 DlgEnable "AddDel4", 0 DlgEnable "AddDel5", 0 DlgEnable "DelText", 0 DlgEnable "Del2Text", 0 DlgEnable "Del2JText", 0 DlgEnable "Del2J2Text", 0 DlgEnable "Add", 0 DlgEnable "Del", 0 DlgEnable "Add2", 0 DlgEnable "Del2", 0 DlgEnable "Add2J", 0 DlgEnable "Del2J", 0 Case "AD" DlgValue "NewBook", 0 DlgValue "Other", 0 If DlgValue("AD") = 1 Then DlgEnable "AddDel0", 1 DlgEnable "AddDel1", 1 DlgEnable "AddDel2", 1 DlgEnable "AddDel3", 1 DlgEnable "AddDel4", 1 DlgEnable "AddDel5", 1 DlgEnable "DelText", 1 DlgEnable "Del2Text", 1 DlgEnable "Del2JText", 1 DlgEnable "Del2J2Text", 1 If DlgValue("AddDel0") = 1 or DlgValue("AddDel1") = 1 Then DlgEnable "Add", 1 ElseIf DlgValue("AddDel2") = 1 or DlgValue("AddDel3") = 1 Then DlgEnable "Del", 1 ElseIf DlgValue("AddDel4") = 1 Then DlgEnable "Add2", 1 DlgEnable "Del2", 1 ElseIf DlgValue("AddDel5") = 1 Then DlgEnable "Add2J", 1 DlgEnable "Del2J", 1 End If Else DlgEnable "AddDel0", 0 DlgEnable "AddDel1", 0 DlgEnable "AddDel2", 0 DlgEnable "AddDel3", 0 DlgEnable "AddDel4", 0 DlgEnable "AddDel5", 0 DlgEnable "DelText", 0 DlgEnable "Del2Text", 0 DlgEnable "Del2JText", 0 DlgEnable "Del2J2Text", 0 DlgEnable "Add", 0 DlgEnable "Del", 0 DlgEnable "Add2", 0 DlgEnable "Del2", 0 DlgEnable "Add2J", 0 DlgEnable "Del2J", 0 End If Case "Other" DlgValue "NewBook", 0 DlgValue "AD", 0 DlgEnable "AddDel0", 0 DlgEnable "AddDel1", 0 DlgEnable "AddDel2", 0 DlgEnable "AddDel3", 0 DlgEnable "AddDel4", 0 DlgEnable "AddDel5", 0 DlgEnable "DelText", 0 DlgEnable "Del2Text", 0 DlgEnable "Del2JText", 0 DlgEnable "Del2J2Text", 0 DlgEnable "Add", 0 DlgEnable "Del", 0 DlgEnable "Add2", 0 DlgEnable "Del2", 0 DlgEnable "Add2J", 0 DlgEnable "Del2J", 0 Case "AddDel0" DlgValue "AddDel0", 1 DlgValue "AddDel1", 0 DlgValue "AddDel2", 0 DlgValue "AddDel3", 0 DlgValue "AddDel4", 0 DlgValue "AddDel5", 0 DlgEnable "Add", 1 DlgEnable "Del", 0 DlgEnable "Add2", 0 DlgEnable "Del2", 0 DlgEnable "Add2J", 0 DlgEnable "Del2J", 0 Case "AddDel1" DlgValue "AddDel0", 0 DlgValue "AddDel1", 1 DlgValue "AddDel2", 0 DlgValue "AddDel3", 0 DlgValue "AddDel4", 0 DlgValue "AddDel5", 0 DlgEnable "Add", 1 DlgEnable "Del", 0 DlgEnable "Add2", 0 DlgEnable "Del2", 0 DlgEnable "Add2J", 0 DlgEnable "Del2J", 0 Case "AddDel2" DlgValue "AddDel0", 0 DlgValue "AddDel1", 0 DlgValue "AddDel2", 1 DlgValue "AddDel3", 0 DlgValue "AddDel4", 0 DlgValue "AddDel5", 0 DlgEnable "Add", 0 DlgEnable "Del", 1 DlgEnable "Add2", 0 DlgEnable "Del2", 0 DlgEnable "Add2J", 0 DlgEnable "Del2J", 0 Case "AddDel3" DlgValue "AddDel0", 0 DlgValue "AddDel1", 0 DlgValue "AddDel2", 0 DlgValue "AddDel3", 1 DlgValue "AddDel4", 0 DlgValue "AddDel5", 0 DlgEnable "Add", 0 DlgEnable "Del", 1 DlgEnable "Add2", 0 DlgEnable "Del2", 0 DlgEnable "Add2J", 0 DlgEnable "Del2J", 0 Case "AddDel4" DlgValue "AddDel0", 0 DlgValue "AddDel1", 0 DlgValue "AddDel2", 0 DlgValue "AddDel3", 0 DlgValue "AddDel4", 1 DlgValue "AddDel5", 0 DlgEnable "Add", 0 DlgEnable "Del", 0 DlgEnable "Add2", 1 DlgEnable "Del2", 1 DlgEnable "Add2J", 0 DlgEnable "Del2J", 0 Case "AddDel5" DlgValue "AddDel0", 0 DlgValue "AddDel1", 0 DlgValue "AddDel2", 0 DlgValue "AddDel3", 0 DlgValue "AddDel4", 0 DlgValue "AddDel5", 1 DlgEnable "Add", 0 DlgEnable "Del", 0 DlgEnable "Add2", 0 DlgEnable "Del2", 0 DlgEnable "Add2J", 1 DlgEnable "Del2J", 1 'End Select 'End If End Select Case 3 Case 4 Case 5 End Select End Function Function WorkForm() Dim NIKNGK$(2) Dim YN$(2) Dim ShelfStat$(2) Dim ItemStat$(5) NIKNGK$(0)=" " NIKNGK$(1)="NIK/NIK" NIKNGK$(2)="NGK/NGK" YN$(0)=" " YN$(1)="Y" YN$(2)="N" ShelfStat$(0)=" " ShelfStat$(1)="CIRCULATING" ShelfStat$(2)="NON CIRCULATING" ItemStat$(0)=" " ItemStat$(1)="On Shelf/[Due Date]" ItemStat$(2)="On Order/Checked Out" ItemStat$(3)="On Display" ItemStat$(4)="At Bindery" ItemStat$(5)="In Storage" WhichButton=1 WorkDialog: Begin Dialog FDialog 356, 200, "Workform", .DlgWorkform Text 8, 1, 201, 9, "Enter data to be changed for all selected records; leave blank all" Text 8, 10, 90, 8, "fields that you want left alone" Text 11, 22, 23, 8, "Active:" DropListBox 34, 20, 46, 40, NIKNGK, .Active Text 81, 22, 18, 8, "Perm:" DropListBox 100, 20, 46, 40, NIKNGK, .Perm Text 147, 22, 23, 8, "Status:" DropListBox 171, 21, 39, 60, ItemStat, .ItemStatus Text 12, 38, 22, 8, "Call #:" TextBox 34, 36, 163, 13, .CallNumber Text 10, 54, 24, 8, "Format:" TextBox 34, 52, 10, 12, .Format Text 111, 54, 18, 8, "Scat:" TextBox 130, 52, 16, 12, .Scat Text 1, 70, 33, 8, "Loan Cat:" TextBox 34, 68, 10, 12, .LoanCat Text 111, 70, 18, 8, "Cost:" TextBox 130, 68, 24, 12, .Cost Text 87, 88, 42, 8, "Shelf Status:" DropListBox 130, 84, 66, 40, ShelfStat, .ShelfStatus Text 9, 102, 25, 8, "Renew:" DropListBox 34, 100, 20, 40, YN, .Renew Text 82, 102, 47, 8, "Purge Protect:" DropListBox 130, 100, 20, 40, YN, .PurgeProtect Text 13, 118, 21, 8, "Local:" DropListBox 34, 116, 20, 40, YN, .Local Text 59, 118, 17, 8, "Area:" DropListBox 78, 116, 20, 40, YN, .Area Text 103, 118, 26, 8, "System:" DropListBox 130, 116, 20, 40, YN, .Sys Text 151, 118, 39, 8, "Intersystem:" DropListBox 191, 116, 20, 40, YN, .InterSys Text 88, 134, 41, 8, "Date Added:" TextBox 130, 132, 40, 13, .DateAdd Text 9, 150, 25, 8, "Note 1:" TextBox 34, 148, 164, 12, .Note1 Text 9, 166, 25, 8, "Note 2:" TextBox 34, 164, 164, 12, .Note2 GroupBox 212, 1, 139, 38, "Choose one" CheckBox 217, 8, 59, 10, "Remove 'New'", .NewBook CheckBox 217, 18, 114, 10, "Add to/Delete from call number", .AD CheckBox 217, 28, 113, 10, "Other special call num. change", .Other CheckBox 217, 44, 117, 10, "Add to start of Adult call number", .AddDel0 CheckBox 217, 56, 119, 10, "Add after 'J/' of Juv. call number", .AddDel1 CheckBox 217, 92, 133, 10, "Delete from start of Adult call number", .AddDel2 CheckBox 217, 104, 127, 10, "Delete after 'J/' of Juv. call number", .AddDel3 CheckBox 217, 139, 33, 10, "Delete", .AddDel4 CheckBox 217, 161, 33, 10, "Delete", .AddDel5 GroupBox 212, 36, 139, 48, "" TextBox 244, 68, 85, 12, .Add GroupBox 212, 82, 139, 51, "" TextBox 252, 117, 12, 12, .Del Text 265, 119, 39, 8, "characters", .DelText GroupBox 212, 130, 139, 59, "", .Group3 TextBox 252, 138, 12, 12, .Del2 TextBox 275, 149, 62, 12, .Add2 Text 265, 140, 67, 8, "characters and add", .Del2Text TextBox 252, 160, 12, 12, .Del2J Text 265, 162, 69, 8, "characters after 'J/'", .Del2JText TextBox 275, 171, 62, 12, .Add2J Text 243, 174, 30, 8, "and add", .Del2J2Text OkButton 62, 180, 40, 14, .OK CancelButton 114, 180, 40, 14, .Cancel End Dialog Dim Fields As FDialog Fields.NewBook=0 Fields.Other=0 WhichButton=Dialog(Fields) If WhichButton=0 Then WkFm="" Goto done End If NB=Trim(Str(Fields.NewBook)) Other=Trim(Str(Fields.Other)) If Fields.CallNumber<>"" Then NB="0" Other="0" End If WkFm="" WkFm=WkFm + NB + Other 'WkFm=WkFM+Trim(Str(Fields.NewBook))+Trim(Str(Fields.LTPT)) If Fields.Active<>0 Then If Fields.Active=1 Then WkFm=WkFm+"NIK/NIK" Else WkFm=WkFm+"NGK/NGK" Else WkFm=WkFm+chr(27)+"[B" 'Skip Active field End If If Fields.Perm<>0 Then If Fields.Perm=1 Then WkFm=WkFm+"NIK/NIK" Else WkFm=WkFm+"NGK/NGK" Else WkFm=WkFm+chr(27)+"[B" 'Skip Perm field End If 'If Fields.Active<>"" Then WkFm=WkFm+Left(Fields.Active, 7) Else WkFm=WkFm+chr(27)+"[B" 'If Fields.Perm<>"" Then WkFm=WkFm+Left(Fields.Perm, 7) Else WkFm=WkFm+chr(27)+"[B" WkFm=WkFm+chr(27)+"[B" 'Skip Barcode If Fields.ItemStatus<>0 Then WkFm=WkFm+Chr(1)+"b" 'Shift-F2 statArr=0 Do While statArr < Fields.ItemStatus-1 WkFm=WkFm+chr(27)+"[B" statArr=statArr+1 Loop WkFm=WkFm+chr(13)+chr(10)+chr(27)+"[B" Else WkFm=WkFm+chr(27)+"[B" 'Skip Status End If If Fields.CallNumber<>"" Then If Len(Fields.CallNumber)>48 Then ClNm=Left(Fields.CallNumber, 48) Else ClNm=Fields.CallNumber End If WkFm=WkFm+Chr(4)+ClNm ElseIf Fields.AD=1 Then 'AddD=Fields.AddDel If Fields.AddDel0 = 1 Then AddD = 0 ElseIf Fields.AddDel1 = 1 Then AddD = 1 ElseIf Fields.AddDel2 = 1 Then AddD = 2 ElseIf Fields.AddDel3 = 1 Then AddD = 3 ElseIf Fields.AddDel4 = 1 Then AddD = 4 ElseIf Fields.AddDel5 = 1 Then AddD = 5 End If Select Case AddD Case 0 To 1 If Fields.Add="" Then MsgBox "You need to fill in the proper box." Goto WorkDialog End If AddText$=Fields.Add If Right(AddText$, 1)<>"/" Then AddText$=AddText$+"/" If AddD=1 Then AddText$=Chr(27)+"[C"+Chr(27)+"[C"+AddText$ ClNm=Chr(5)+AddText  ~j  C 6  j  j  E 6! j  > j  69 j >( j r( j6C jl8p8 e7llclplcl7&667  R"6:6D(l 50R"6:6D(l 50l 50l 6FDl 50 l l .l >50N^(l 507w f 0t"(0innl n nr~t~v~ ' 'XL.Quit Set XL = Nothing Done: End Sub AgyAuthsite1site2RptDay_site3IEi_Filename____URLfinishedXLfilenumxcntrdataRptDateScatTestcheckoutrenewalchksrnlswhatcellyj______mainC:\OCLCAPPS\OCLCSBL.DLL 555 5] 5e  5j(0~25s(\[q5-5(j5(5֚8@&@5ޚ(l76@5ޚ(j:(8 H0PXq5X&0q5*FFq5*F "6(j#@5ޚ(j$ 6(j&6' &(*q60+ /~26'(\[V0qV5-2qV6;0455675(5֚8@96N&qV6U6\g6-:6l&qV6U6\x6-;6}&qV6U6\6-<6&qV6U6\6-=6&qV6U6\6->&qV6U66-@eAd8Ad@5ޚ(jCBfBvCf dfBDdj`jOjIEf7F(`ihGh&qV6U66-HI(`8ipJp&66lKLMwNPdjxjOjIQdjjOjIR(`i`R(xixR(iSH(x8iiTH(8iiV6v(8W6`(&qV6U6-X6v(8Y&qV6U6-Z6v(8[&qV6U6-\v &v_f &f` dfEa dfBb dfBfcddjFefWgdj>i6v(8j6&qV6U6-k6v(8l6v(86H&qV6\U6-m6v(8n6v(86H&qV6\U6-pjvcq6HP6\v6&qV6U6(86-r6HP6\v6&qV6U6(86-si;uqV6 6 &0v6w &xz5&qV6)6\;6-{6&qV6)6\ 6- V ' MacroName: MonthlyScatToExcel ' MacroDescription: Get the Monthly Statistics by Item Scat ' report, and push the data into an Excel ' spreadsheet ' Macro written by: Joel Hahn, Niles Public Library District 'Note: Requires MS Internet Explorer and Excel. Altering for 'Netscape & some other spreadsheet program is technically 'feasible, but I'm not sure of what all of the needed object 'methods would be, nor how they work. 'Note: Currently optimized for members of the CCS consortium, 'whose statistical reports can be retrieved from a web site. 'Other users may have to strip off the IESide program block-- 'un-commenting the Goto ExcelSide should do the trick nicely-- 'and manually use PfW's file capture to turn their Libs+ Monthly 'Statistics by Item Scat report into an electronic file 'readable by the ExcelSide program block. 'Note: Currently set up for a library with two Libs+ agencies, 'such as one for the main library and a second for a branch or 'bookmobile. The macro should be easy to alter to deal with 'only one or many agencies, as needed. 'Note: You have to save the final Excel spreadsheet yourself; 'you'll probably want to examine it anyway and choose your own 'filename for the finished product. sub main Agy$="##1" 'For CCS libraries: Agency to start with Auth$="######" 'And authorization code for that agency Dim IE As Object Dim XL As Object site1$ = "http://ccs1.ccs.nsls.lib.il.us:8080/cgi-bin/private/arc  j6G4 j7)U "j89W^ 6 j9U$ *j:d( j;4d( j<6 j?e@@AB6H6gh7C6kjDEE6H6h7F6kjGHH6H77WI6jJCKErptfile?rpt=s12&agy=" site2$ = "&day=" RptDay$ = "01" site3$ = "&auth=" + Auth$ 'Goto ExcelSide IESide: 'Start the Internet Explorer and make it visible Set IE = CreateObject("InternetExplorer.Application") IE.Visible = True AppActivate "Microsoft Internet Explorer" i=1 Do Filename$="C:\My Documents\"+Agy$+"mscat" If Dir(Filename$+".txt")<>"" Then Kill Filename$+".txt" End If URL$=site1$+Agy$+site2$+RptDay$+site3$ IE.Navigate URL$ finished = IE.ReadyState Do While finished<>4 finished = IE.ReadyState Loop SendKeys "%fa" SendKeys Filename$+".txt" SendKeys "{TAB}t{ENTER}", -1 Agy$="##2" 'Second agency i=i+1 Loop While i<=2 IE.Quit Set IE = Nothing 'Goto Done ExcelSide: Set XL = CreateObject("Excel.Application") XL.Visible = True 'XL.Workbooks.Open(filename$+".xls") XL.Workbooks.Add Agy$="##1" 'Starting agency again i=1 Do filename$="C:\My Documents\"+Agy$+"mscat" XL.Range("A1").Value = "Scat" XL.Range("B1").Value = "Checkouts" XL.Range("C1").Value = "Renewals" XL.Range("D1").Value = "Total %" XL.Range("E1").Value = "Total %" XL.Range("H2").Value = Agy$ filenum%=FreeFile Open filename$+".txt" for Input as filenum% x=1 : cntr=2 Do Until x=Lof(filenum%) Line Input #filenum%, data$ If x=1 Then RptDate$=Left(data$,10) XL.Range("H1").Value = RptDate$ End if ScatTest$=Mid(data$,13,1) If ScatTest$ Like "[0-9]" Then Goto GoOn Else Goto DoNext End If GoOn: Line Input #filenum%, checkout$ Line Input #filenum%, renewal$ data$=Trim(data$) : checkout$=Trim(checkout$) : renewal$=Trim(Renewal$) chks$=Trim(Mid(checkout$,15,11)) rnls$=Trim(Mid(renewal$,15,11)) whatcell$ = "A" + CStr(cntr) XL.Range(whatcell$).Value = "'"+data$ whatcell$ = "B" + CStr(cntr) XL.Range(whatcell$).Value = chks$ whatcell$ = "C" + CStr(cntr) XL.Range(whatcell$).Value = rnls$ cntr=cntr+1 DoNext: x=x+1 y=Seek(filenum%) If y>Lof(filenum%) then x=Lof(filenum%) Else Seek filenum%,y End If Loop Close filenum% whatcell$ = "A" + CStr(cntr) XL.Range(whatcell$).Value = "TOTALS:" whatcell$ = "B" + CStr(cntr) XL.Range(whatcell$).Value = "=SUM(B2:B"+CStr(cntr-1)+")" whatcell$ = "C" + CStr(cntr) XL.Range(whatcell$).Value = "=SUM(C2:C"+CStr(cntr-1)+")" For j=2 to cntr-1 XL.Range("D"+CStr(j)).Value= "=B"+CStr(j)+"/B"+CStr(cntr)+"*100" XL.Range("E"+CStr(j)).Value= "=C"+CStr(j)+"/C"+CStr(cntr)+"*100" Next j XL.Sheets("Sheet2").Select Agy$="##2" 'Second agency to get--e.g. for bookmobile or branch i=i+1 Loop While i<=2 XL.Sheets("Sheet1").Name = "##1" 'Starting Agency XL.Sheets("Sheet2").Name = "##2" 'Second Agency 'XL.ActiveWorkbook.SaveAs Filename:=Filename$+".xls", _ ' FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ' ReadOnlyRecommended:=False, CreateBackup:=False   TRUE"CreateObjectobjectT L 5 TMNPqH82\@QHiHRT6 dtHlSTUHi6 VWAWHi6 %X Hf GHiHYZ Hf [\]Hih r@v^_`q 2\@K6H77WL6jMNOQqHl6h2\5Rjc&3SqHl50h2\5Ti&Vq 5;2\CX6YFZF5[ B% j 6 j\< j] j^! j_6jaVeFbFbdV eq hHl     !"#$%&'()*+,-./0123456789:;<=>?@BDQEFGHIJKONRPWiSTUV`XYZ[\]^abcdefghjklmnpqrstuvwyz{|}~2\5gq Hl5;h2\Ciq(2\KjH6h(^nlkkq662\5mq Hl5;h2\Cn6 60jo ppH6h(^nldqq662\5sq Hl5;h2\Ct6 6!0jupxzq8DL2\K{q@C2\K|6g@i 0@}qH;F2\K~HiH(cq82\5H8x @ @ @f G@i@~~VPPi6P6PP@X:~xPPi6P6P5+P0 @f G@i`X~@h  @f @iX\~Ih 5+ @f  H@i0X7hjc:hhHl50^nhiqhhHl2\5qX2\5q Hl5;h2\CqHl64h2\5q 68hHl5;^n2\Cq662\5q 6A2\CqHl6Jh2\5q6N2\CqHl2\5q 5;2\C6 H6Ҙ 2!ğ&.02468:<DLTVXZ\^`bdfnv~ActivePermItemStatusCallNumberFormatScatLoanCatCostShelfStatusRenewPurgeProtectLocalAreaSysInterSysDateAddNote1Note2NewBookADOtherAddDel0AddDel1AddDel2AddDel3AddDel4AddDel5AddDelDel2Add2Del2JAdd2JFDialog..FWkFmYNChoiceDialogy2/ "*AddDelAddDelDel2Add2Del2JAdd2JAddDelete)1BCodeBarcodesGNCallNumCallNumWhichControlactionsuppvalueSessionApplication_x~=z~| ~~~76(j~0(0i606(0~Ml6l .6>N0^(0l0l .n76(jh 6(jqjc*nl ni~Gl6l .6>Nn ^ne77W6(jh 6(j@jc*nl ni0nl 0.l >nL977W6(jgh 6(j'jc"2*nl ni"20l6l .6>Nn ^l B0Rbrl nn l 50&7)(&i(l 50.7"(.il 5067)(6i(l 50>7b(>i6$!6$>(> l 50FF81l 6Vy1l 6d9*l 6(l 50HRH"6N6R(l 50JRJ"6N6R(l 50LRL"6N6R(l 50NRN"6N6R(l 50PRP"6N6R(l 50RRR"6N6R(l 50T7.l T(l 50\7Il \.l >50N^(l 50d7Il d.l >50N^(l 50~u2\[ < 8  - j 62 j ( j( j 6Cj 6nj6jev((H887H,H8lXhH8l8l8HXlxHXl Hl8 h8!"( % v j 6 j&'t 6\j(v 6j)( 6j*5~ 6j+H! 6j,V! 6j-? j. 6 j/, j0.' 6 j1< 6 j2)G j39IC 6  j4G4 j5)U "j69W^ 6 j7U$ *j8d( j94d( j:6j=e>>m?@6H6lh7A6pjBCC6H6h7D6pjEFF6H77WG6jHCIEI6H77WJ6jKLMOq2N2\KPH6hl"Q f "iRH6hl2S2 ih BT f 22 H ih RV6(W(6(Y0 ~9 j0 61 jZ0( j[0x ( j\0(  j]0@(  j^6=0j`RB Hba0bejbjbcb8d86e/fg8h zhzi6OjjnznRBz H>o6gRB H 6y@jp)qrBz HRstvqHl6h2\5wq 5;2\Cyz|q2N2\K}qHDL2\K~qPC2\K6Pi PqX;F2\KXiX(cq82\5H8x P P Pf GPiPV``i6`6``Ph,x``i6`6`5+` Pf GPi@h@h  Pf PihNPh 5+ Pf  HPi h^h  Pf Pih``hhzgh  Pf  HPih`5+`h h hf 0t0hih7pjc:phHl50piqphHl2\5qh2\5q Hl5;h2\CqHl6h2\5q 6hHl5;2\Cq662\5q 62\CRB H@qHl6h2\5q 5;2\C HRB H6jؘ 2!ğ&.02468:<DLTVXZ\^`bdfnv~ActivePermItemStatusCallNumberFormatScatLoanCatCostShelfStatusRenewPurgeProtectLocalAreaSysInterSysDateAddNote1Note2NewBookADOtherAddDel0AddDel1AddDel2AddDel3AddDel4AddDel5AddDelDel2Add2Del2JAdd2JFDialog..FWkFmYNChoiceDialogy2/ "*AddDelAddDelDel2Add2Del2JAdd2JAddDelete-<HowManyChangeRecsKRCallNumCallNumWhichControlactionsuppvalueSessionApplication$+Chr(5) Case 2 To 3 If Fields.Del="" Then MsgBox "You need to fill in the proper box." Goto WorkDialog End If NumDel=Val(Fields.Del) If NumDel=0 Then MsgBox "You need to fill in the proper box with a number." Goto WorkDialog End If For i=1 to NumDel ClNm=ClNm+Chr(127) Next If AddD=3 Then ClNm=Chr(27)+"[C"+Chr(27)+"[C"+ClNm Case 4 If Fields.Add2="" or Fields.Del2="" Then MsgBox "You need to fill in the proper boxes." Goto WorkDialog End If NumDel=Val(Fields.Del2) If NumDel=0 Then MsgBox "You need to fill in the proper box with a number." Goto WorkDialog End If For i=1 to NumDel ClNm=ClNm+Chr(127) Next AddText$=Fields.Add2 'If Right(AddText$, 1)<>"/" Then AddText$=AddText$+"/" ClNm=ClNm+Chr(5)+AddText$+Chr(5) Case 5 If Fields.Add2J="" or Fields.Del2J="" Then MsgBox "You need to fill in the proper boxes." Goto WorkDialog End If NumDel=Val(Fields.Del2J) If NumDel=0 Then MsgBox "You need to fill in the proper box with a number." Goto WorkDialog End If For i=1 to NumDel ClNm=ClNm+Chr(127) Next AddText$=Fields.Add2J 'If Right(AddText$, 1)<>"/" Then AddText$=AddText$+"/" ClNm=Chr(27)+"[C"+Chr(27)+"[C"+ClNm+Chr(5)+AddText$+Chr(5) End Select WkFm=WkFm+ClNm End If WkFm=WkFm+chr(27)+"[B" If Fields.Format<>"" Then WkFm=WkFm+Left(Fields.Format, 1) Else WkFm=WkFm+chr(27)+"[B" If Fields.Scat<>"" Then WkFm=WkFm+Left(Fields.Scat, 4) WkFm=WkFm+chr(27)+"[B" If Fields.LoanCat<>"" Then WkFm=WkFm+Left(Fields.LoanCat, 1) Else WkFm=WkFm+chr(27)+"[B" If Fields.Cost<>"" Then If Left(Fields.Cost, 1)<>"$" Then WFCost="$"+Fields.Cost Else WFCost=Fields.Cost WkFm=WkFm+WFCost End If WkFm=WkFm+chr(27)+"[B" If Fields.ShelfStatus<>0 Then Select Case Fields.ShelfStatus Case 1 WkFm=WkFm+Chr(4)+"CIRCULATING" Case 2 WkFm=WkFm+Chr(4)+"NON CIRCULATING" Case 3 WkFm=WkFm+Chr(4)+"OFFLINE" End Select End If WkFm=WkFm+chr(27)+"[B" If Fields.Renew<>0 Then If Fields.Renew=1 Then WkFm=WkFm+"Y" Else WkFm=WkFm+"N" Else WkFm=WkFm+chr(27)+"[B" End If If Fields.PurgeProtect<>0 Then If Fields.PurgeProtect=1 Then WkFm=WkFm+"Y" Else WkFm=WkFm+"N" Else WkFm=WkFm+chr(27)+"[B" End If If Fields.Local<>0 Then If Fields.Local=1 Then WkFm=WkFm+"Y" Else WkFm=WkFm+"N" Else WkFm=WkFm+chr(27)+"[B" End If If Fields.Area<>0 Then If Fields.Area=1 Then WkFm=WkFm+"Y" Else WkFm=WkFm+"N" Else WkFm=WkFm+chr(27)+"[B" End If If Fields.Sys<>0 Then If Fields.Sys=1 Then WkFm=WkFm+"Y" Else WkFm=WkFm+"N" Else WkFm=WkFm+chr(27)+"[B" End If If Fields.InterSys<>0 Then If Fields.InterSys=1 Then WkFm=WkFm+"Y" Else WkFm=WkFm+"N" Else WkFm=WkFm+chr(27)+"[B" End If If Fields.DateAdd<>"" Then WkFm=WkFm+chr(4)+Fields.DateAdd Else WkFm=WkFm+chr(27)+"[B" If Fields.Note1<>"" Then WkFm=WkFm+chr(4)+Fields.Note1+chr(27)+"[B" Else WkFm=WkFm+chr(27)+"[B" If Fields.Note2<>"" Then WkFm=WkFm+chr(4)+Fields.Note2+chr(27)+"[B" Else WkFm=WkFm+chr(27)+"[B" 'MsgBox WkFm done: WorkForm=WkFm End Function Z Q2  $6 ->=A#AANEW BOOKNEW J/NEW BOOKJ/NEWJ/[B [?25hLTP-T, LARGE TYPEJ/PARENT-TEACHER/,AddDel0AddDel1AddDel2AddDel3AddDel4AddDel5DelTextDel2Text Del2JText Del2J2TextAddDelAdd2Del2Add2JDel2JNewBookADOther NIK/NIKNGK/NGKYN CIRCULATINGNON CIRCULATINGOn Shelf/[Due Date]On Order/Checked Out On Display At Bindery In StorageWorkformBEnter data to be changed for all selected records; leave blank allfields that you want left aloneActive:Perm:Status:Call #:Format:Scat: Loan Cat:Cost: Shelf Status:Renew:Purge Protect:Local:Area:System: Intersystem: Date Added:Note 1:Note 2: Choose one Remove 'New'Add to/Delete from call numberOther special call num. change!Add to start of Adult call number"Add after 'J/' of Juv. call number&Delete from start of Adult call number%Delete after 'J/' of Juv. call numberDelete characterscharacters and addcharacters after 'J/'and addK___Active_Perm_ItemStatus_CallNumber_Format_Scat_LoanCat_Cost_ShelfStatus_Renew_PurgeProtect_Local_Area_Sys_InterSys_DateAdd_Note1_Note2_NewBookADOtherAddDel0AddDel1AddDel2AddDel3AddDel4AddDel5_Add_DelDelTextGroup3Del2Add2Del2TextDel2JDel2JTextAdd2JDel2J2TextOKCancel0b#You need to fill in the proper box./[C1You need to fill in the proper box with a number.%You need to fill in the proper boxes.$OFFLINE:EZ 8_>|Eյ/<௾(>P{#Or5V F FVjzCSnTimeOut2Caller_NBookNewCall_DADnArrDownArrows_______V F 6FVfv (0CSnTimeOutCaller_CallerCheckCNStatus______NewCallplaceNC1NC2DADnArrDownArrows__ 2B______&@@@@"  .>N^n(~0"2BRbrNIKNGKYNShelfStatItemStatWhichButton_FieldsWkFm__NB__OtherstatArr____ClNm_AddDAddText_NumDeli___________WFCostNewBookGenericChangeCallNumDlgWorkFormWorkForm5F FmK+Passport ~u2\[< 8ih  f Giޜ  i5.   i5.   i5.   i5.#  6!66, f Gi6, f Gi645.+ f Gi?6-5.+ f GiF F7 fjVFcjz;!l5.0"ifjz#ql2\5$q2\5'q 5.;2\C*D~u2\[< 8ih  f GiޜqO2\K i5.V 65.[FVfvl i5.+65aFVfvl , 45.f f Gi!65.[FVfvl< f i 7( !ީi " 6 f 2# f i($ %7(&'(5.s ())P*65.FVfvl+i,-,..23 34705jc:60F6lV5.0fv07i8q0F6lV2\59q2\5>| I8r5 j5 j5 j5 j5 j5 j 5ǩ j 5ѩ j 5ܩ j 5 j 5 j5 j6 j6 j6 j6 j5 {66) 6. 5 j5 j5 j5 j5 j5 j5ǩ j 5ѩ j!5ܩ j"5 j#5 j$5 j%6 j&6 j'6 j(6 j) )6)*6 +6. ,6) 7-5 j.5 j/5 j05 j15 j25 j35ǩ j45ѩ j55ܩ j65 j75 5*2BW85 j995 5*2BW:5 j;;5 7<6 j=6 j>O>5 0?6 j@6 jABhC5 jD5 jE5 jF5 jG5 jH5 jI5ǩ jJ5ѩ jK5ܩ jL5 jM5 jN5 jO6 jP6 jQ6 jR6 jSTT6.U6 V6) W5 jX5 jY5 jZ5 j[5 j\5 j]5ǩ j^5ѩ j_5ܩ j`5 ja5 jb5 jc6 jd6 je6 jf6 jgg5h5 i5 j5 k5 l5 m5 n5 jo5 jp6 jq6 jr6 js6 jtt5u5 v5 w5 x5 y5 z5 {5 j|5 j}6 j~6 j6 j6 j55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j55 5 5 5 5 5 5 j5 j6 j6 j6 j6 jS55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j&55 5 5 5 5 5 5 j5 j6 j6 j6 j6 j8#"666:6D 66 6N 6R 66 6V6d666v6666 dȓj  6 j ɚ 6 j Z 6 j  6< j ".( j Q 6F j d.( j  6N j  '< j! & 6X j" "$ j# 6 6b j$ "4 j% o6 6l j& 4 j' F! 6t j( "D j) oF 6 j* D &j+ WX* 6 j, TB( .j- f 6 j. "d( 0j/ Rf/ 6 j0 d( 2j1 v 6 j2 "t( 4j3 ;v 6 j4 Nt( 6j5 gv 6 j6 t( 8j7 v' 6 j8 t( :j9 X) 6 j: (  " Lj? Ԓ& 6 j@ ٙ; 6 TjA ٣r 6VjB ٭q 6;XjC ,u 6\ZjD 8w 6\jE \ 6^jF h 6`jG ! 6bjH ! 6djI $0 7 jJ DU fjK R3 7 jL u njM  w' 6 jN ; 7 jO  vjP  > ~jQ  C 6  jR  jS  E 6! jT  > jU  69 jV >( jW r( jX6C jZl8[p8\ e]^7_`bllclcplcld7&e6f6gi7j  mRn"n6:nn6Do(pl 50qrRs"s6:ss6Dt(ul 50vyl 50z{l 6|}FD~l 50 l l .l >50N^(l 507w f 0t"(0innl n nr~t~v~_x~=z~| ~~~76(j~0(0i606(0~Ml6l .6>N0^(0l0l .n76(jh 6(jqjc*nl ni~Gl6l .6>Nn ^ne77W6(jh 6(j@jc*nl ni0nl 0.l >nÍL977W6(jƍgh 6(jˍ'jc"2*nl ni"20l6l .6>Nn ^l B0Rbrl nn l 50&7)(&i׍(l 50.7"(.il 5067)(6iڍ(l 50>7b(>i6$!6$>(܍> l 50FF81l 6Vy1l 6d9*l 6(l 50HRH"6N6R(l 50JRJ"6N6R(l 50LRL"6N6R(l 50NRN"6N6R(l 50PWP$6N6R)l 50RWR$6N6R) l 50  T70 l T ) l 50 \7K l \.l >50N^ ) l 50 d7K l d.l >50N^ ) l 50 v!ğ&.02468:<DLTVXZ\^`bdfnv~ActivePermItemStatusCallNumberFormatScatLoanCatCostShelfStatusRenewPurgeProtectLocalAreaSysInterSysDateAddNote1Note2NewBookADOtherAddDel0AddDel1AddDel2AddDel3AddDel4AddDel5AddDelDel2Add2Del2JAdd2JFDialog&CallNumCallNumWhichControlactionsuppvalueSessionApplication' MacroName: LastSystem ' MacroDescription: Take a file of Last System Copy ATKeys, ' delete the CCS records, and make a file of the "deleted" ' OCLC numbers ' Written by: Joel Hahn, Niles Public Library District Type ATKey ATKey As String * 12 CRLF As String * 2 End Type sub main Dim KeyIn as ATKey Dim CS as Session Set CS = CurrentSession filename$="C:\clsi\lastsys.txt" filenum%=FreeFile lenfile=FileLen(filename$) numrecs=lenfile/14 Open filename$ for Random As filenum% Len=14 pos=1 Do Until pos>numrecs Get #filenum%, pos, KeyIn If KeyIn.ATKey=" " Then Goto DoNext2 CS.Send KeyIn.AtKey + Chr(13) CS.Receive 10, "[?25h" CS.GetTextInRegion CheckScreen$, 7, 20, 7, 79 If InStr(1, CheckScreen$, "| There are no satisfiers for this |")>0 or InStr(1, CheckScreen$, "There are no satisfiers for this")>0 Then 'MsgBox "No need to delete" CS.Send " " CS.Receive 10, "[?25h" Goto DoNext End If CS.GLastSystem.DES*mLastSystem.BIN/8fMarcCopy.SRCL@MarcCopy.DESHf etTextInRegion SysCopies$, 10, 38, 10, 46 CS.GetTextInRegion LocCopies$, 11, 38, 11, 46 CS.GetTextInRegion SysOrders$, 10, 71, 10, 79 CS.GetTextInRegion LocOrders$, 11, 71, 11, 79 SysCopies$=Trim(SysCopies$) LocCopies$=Trim(LocCopies$) SysOrders$=Trim(SysOrders$) LocOrders$=Trim(LocOrders$) If SysCopies$="0" And LocCopies$="0" And SysOrders$="0" And LocOrders$="0" Then If Right(KeyIn.ATKey, 3)="000" Then CS.Send Chr(1)+"g" CS.Receive 10, "[?25h" Else 'Volume record; not base record CS.Send Chr(1)+"G" CS.Receive 10, "[?25h" 'MsgBox "Delete would go here" CS.Send chr(1)+"O" CS.Receive 15, "" ' "[?25h" CS.Send "1" CS.Receive 15, "continue." ' "[?25h" CS.Send " " CS.Receive 15, "[?25h" CS.Send Chr(1)+"d" CS.Receive 15, "[?25h" CS.Send Left(KeyIn.ATKey, 9)+"000\r" CS.Receive 15, "[?25h" CS.GetTextInRegion Volumes$, 10, 38, 10, 46 CS.GetTextInRegion SysOrders$, 10, 71, 10, 79 CS.GetTextInRegion LocOrders$, 11, 71, 11, 79 Volumes$=Trim(Volumes$) SysOrders$=Trim(SysOrders$) LocOrders$=Trim(LocOrders$) If Volumes$="0" and SysOrders$="0" and LocOrders$="0" Then CS.Send Chr(1)+"g" Else 'MsgBox "No need to delete" Goto DoNext End If End If CS.GetTextInRegion CheckScreen, 10, 24, 10, 60 If InStr(1,CheckScreen, "This record is currently locked by") Then 'MsgBox "Someone else is using the record; please try again later." CS.Send " " Goto DoNext End If CS.GetTextInRegion CheckTag, 7,17,7,19 If CheckTag<>"001" Then Goto BadRec End If CS.GetTextInRegion OCLCNum$, 7,27,7,56 OCLCNum$=Trim(OCLCNum$) If InStr(1,OCLCNum$, "Fix me") Then Goto BadRec End If If Left(OCLCNum$,3)="cls" Then Goto BadRec ElseIf Left(OCLCNum$,3)="ocm" Then OCLCNum$=Right(OCLCNum$, Len(OCLCNum$)-3) End If If Len(OCLCNum$)<>8 Then Goto BadRec End If If Val(Left(OCLCNum$,3))>300 Then i=9 Do CS.GetTextInRegion CheckTag,i,17,i,19 If CheckTag="010" Then CS.GetTextInRegion CheckLN$, i,30,i,56 CheckLN$=Trim(CheckLN$) Exit Do End If i=i+9 Loop While i<15 If OCLCNum$=CheckLN$ Then Goto BadRec End If ElseIf Val(Left(OCLCNum$,3))>600 Then Goto BadRec End If 'Store OCLC number in a file, to be batch-deleted later filename2$="G:\DELETE.TXT" filenum2%=FreeFile Open filename2$ For Append As filenum2% Print #filenum2%, OCLCNum$ Close filenum2% 'CS.Send chr(1)+"C" '[F3] 'CS.Receive 10, "[?25h" BadRec: 'Section REMmed out; if record is "bad", almost always, there's 'no OCLC holdings to delete; so just delete the record and be 'done with it ' MsgBox "Please put the printout aside, to be deleted manually." ' CS.Send chr(1)+"C" '[F3] DeleteRecord: 'MsgBox "Delete would go here" CS.Send chr(1)+"O" CS.Receive 15, "" ' "[?25h" CS.Send "1" CS.Receive 15, "continue." ' "[?25h" CS.Send " " CS.Receive 15, "[?25h" DoNext: KeyIn.ATKey=" " Put #filenum%, pos, KeyIn CS.Send Chr(1)+"d" CS.Receive 10, "[?25h" Else 'MsgBox "No need to delete" KeyIn.ATKey=" " Put #filenum%, pos, KeyIn CS.Send Chr(1)+"d" CS.Receive 10, "[?25h" End If DoNext2: pos=pos+1 Loop close filenum% Kill filename$ end sub ' MacroName: MarcCopy ' MacroDescription: Copy a MARC tag to the clipboard ' Written by: Joel Hahn, Niles Public Library District Option Explicit Const CF_TEXT = 1 Const GMEM_SHARE = &H2000 'optional Const GMEM_MOVEABLE = &H2 Const GMEM_ZEROINIT = &H40 Const FOR_CLIPBOARD = GMEM_MOVEABLE Or GMEM_ZEROINIT Or GMEM_SHARE 'may omit GMEM_SHARE Declare Function OpenClipboard Lib "user.dll" (ByVal hwnd As Integer) _ As Integer Declare Function CloseClipboard Lib "user.dll" () As Integer DT a 6 T<bqP82\@cPiPd+ef TgDhHPijk,kHih @vlPmp6 XqeA,8r,#XjCs,jPHjWjQt,j>qTl5 dt2\*q5 2\8q5 2\*q5 2\8q5 2\*q5 02\86 /F m86jFF9m<jjqTl5 dt2\*q5 02\8|6 /F m86jFF9m<jjqTl5 dt2\*q5 02\86 T6Aj>j:E 3/  ATKeyCRLFATKeyISessionApplicationCopy a MARC tag to the clipboardQ;"l |5 # eclare Function EmptyClipboard Lib "user.dll" () As Integer Declare Function SetClipboardData Lib "user.dll" (ByVal wFormat As _ Integer, ByVal hMem As Integer) As Integer Declare Function GetClipboardData Lib "user.dll" (ByVal wFormat As Integer) _ As Integer Declare Function GlobalAlloc Lib "krnl386.exe" (ByVal wFlags As Integer, _ ByVal dwBytes As Long) As Integer Declare Function GlobalLock Lib "krnl386.exe" (ByVal hMem As Integer) As Long Declare Function GlobalUnlock Lib "krnl386.exe" (ByVal hMem As Integer) As _ Integer Declare Function GlobalFree Lib "krnl386.exe" (ByVal hMem As Long) As Integer Declare Sub CopyMemory Lib "krnl386.exe" Alias "hmemcpy" (hpvDest _ As Any, hpvSource As Any, ByVal cbCopy As Long) sub main 'WARNING! Does not get any fields continued on next page of record! Dim nTimeOut as Integer Dim CurRow, CurCol, TotalChars, row2, LineLen, ijk, count, j Dim CurTag$, MarcData$, MarcTag$, RestOfLine$, InData$, text2$, Indicats$, SubfielMarcCopy.BINFg MarcPaste.SRC}MarcPaste.DES?2MarcPaste.BIN@ 00505'Macro cannot handle 505 fields. Sorry.[B [?25h [$][0-9,a-z][ ][AB      5There was an error opening the Clipboard. Exiting...FCopied. Use the MarcPaste macro to paste into a Passport CCS session.!#(W F 6 FVfv(0D8@HPX *:N^nprCSnTimeOutCurRowCurColCurTag_TotalCharsMarcDataMarcTagRestOfLine_______InDatatext2row2LineLeniInLin__NextTestcountjIndicatsSubfield____ijk__retvalhMempMemmain5 user.dllkrnl386.exeOpenClipboardEmptyClipboardGlobalAllocGlobalLockhmemcpySetClipboardDataGlobalUnlockGlobalFreeCloseClipboardF FmK+Passport ~u2\[  8q2\ q2\zq2\i5. ?6qO2\i i f Gi FlVl fv (K$5.%5.+j !#qFl5.UVf2\Z%q 5.`2\h'5.p0(q2\ )05.p;*-q02\.1q2\ 5?P F69q FO2\;8=d8>?@5.vHJFiiF8AB8BF5.vVfvBl8CqD8efEFGHF8lIF8VlPJF8VlXKVF8l8l LFlVl fvPX  *(M3MF8l5.{VlNF8VlXOVF8l8l P(Vd$ Dim i%, NextTest% Dim CS as Session Set CS = CurrentSession ' The default timeout for each command is 3 minutes. ' Increase this value if your host requires more time ' for each command. nTimeOut = 10 '180 CurRow=CS.CursorRow CurCol=CS.CursorColumn 'MsgBox CurRow & "/" & CurCol If CurCol>=17 And CurCol<=19 Then 'CurTag$=Session.ScreenText(CurRow, 17, 1, 3) CS.GetTextInRegion CurTag$, CurRow, 17, CurRow, 19 If Left(CurTag$, 2)="00" Then TotalChars=63 'MarcData$=RTrim(Session.ScreenText(CurRow, 17, 1, TotalChars)) CS.GetTextInRegion MarcData$, CurRow, 17, CurRow, 79 MarcData$ = RTrim(MarcData$) MarcTag$=Left(MarcData$, 3) RestOfLine$=Right(MarcData$, Len(MarcData$)-10) InData$=Chr(10)+Chr(13)+MarcTag$+RestOfLine$ Goto WriteToClipboard ElseIf CurTag$="505" Then MsgBox "Macro cannot handle 505 fields. Sorry." Goto Done End If CS.Send Chr(27)+"[B" ' Wait for response from host. CS.Receive nTimeout, "[?25h" text2$=" " row2=CS.CursorRow 'row1 Do Until text2$<>" " row2=row2-1 'CCS.GetTextInRegion text2$, row2, col1, row2, col1+2 'text2$=Session.ScreenText(row2, 17, 1, 3) CS.GetTextInRegion text2$, row2, 17, row2, 19 Loop 'CCS.GetTextInRegion text3$, row2, col1, row1-1, col1+60 'CCS.GetTextInRegion text3$, row2, col1, CCS.CursorRow-1, col1+60 LineLen=CS.CursorRow-row2-1 DataHandler: ' LineLen=LastRow-CurRow-1 TotalChars=63+(LineLen*80) ''MarcData$=Session.ScreenText(CurRow, 17, 1, TotalChars) 'MarcData$=Session.ScreenText(row2, 17, 1, TotalChars) CS.GetTextInRegion MarcData$, row2, 17, row2+LineLen, 79 i%=1 Dim InLin() ReDim InLin(100) Do InLin(i%)=Trim(GetField(MarcData$, (i% * 2) - 1, "")) 'i%, "||")) 'If i%>1 Then InLin(i%)=Trim(Right(InLin(i%), Len(InLin(i%))-1)) i%=i%+1 NextTest%=InStr(NextTest%+1, MarcData$, "") '"||") Loop While NextTest%<>0 count=UBound(InLin) j=1 Do If j=1 Then MarcTag$=Left(InLin(j), 3) Indicats$=Mid(InLin(j), 5, 2) Subfield$=Mid(InLin(j), 9, 1) RestOfLine$=Right(InLin(j), Len(InLin(j))-10) InData$=Chr(10)+Chr(13)+MarcTag$+Indicats$+Subfield$+RestOfLine$ ElseIf Left(InLin(j), 3) Like "[$][0-9,a-z][ ]" Then Subfield$=Mid(InLin(j), 2, 1) RestOfLine$=Right(InLin(j), Len(InLin(j))-3) InData$=InData$+Chr(10)+Chr(13)+Subfield$+RestOfLine$ ElseIf InLin(j)="" Then Exit Do Else RestOfLine$=InLin(j) InData$=Indata$+RestOfLine$ End If j=j+1 Loop Until j>count End If 'aa$=InputBox$("InData$:",,InData$) For ijk=1 To LineLen+1 InData$ = InData$ + chr(27)+"[A" Next ijk InData$ = InData$ + Chr(9) CS.Send Chr(27)+"[A" CS.Receive nTimeout, "[?25h" WriteToClipboard: Dim hMem As Integer Dim pMem As Long Dim retval As Integer If OpenClipboard(0) Then retval = EmptyClipboard() hMem = GlobalAlloc(FOR_CLIPBOARD, Len(InData$)) pMem = GlobalLock(hMem) CopyMemory ByVal pMem, ByVal InData$, Len(InData$) retval = SetClipboardData(CF_TEXT, hMem) retval = GlobalUnlock(hMem) retval = GlobalFree(pMem) retval = CloseClipboard() Else MsgBox "There was an error opening the Clipboard. Exiting..." End If MsgBox "Copied. Use the MarcPaste macro to paste into a Passport CCS session." Done: end sub ' MacroName: CostAdd ' MacroDescription: For records which have a price of $0.00, check and enter the correct cost ' Written by: Joel Hahn, Niles Public Library District sub main Dim Session as Session Set Session = CurrentSession Dim CS as Session Set CS = CurrentSession DefaultPrice$="22.00" Dim nContinue as Integer Dim nTimeOut as Integer ' The default timeout for each command is 3 minutes. ' Increase this value if your host requires more time Flfvl X  (QYQ87FR^S,T8 U( (VW FXY[Jj: FcN^:\(VFlf5.v(]iJN^^(VFlf(`qFl5.Vf2\Zaq 5.`2\hh\i]n8j (f B \p8k p\r9l (f (r\mp\n8np\n8or\n8p]n8q r5.jsv5.jy 8v   GMEM_MOVEABLEGMEM_ZEROINITGMEM_SHAREFOR_CLIPBOARDCF_TEXT| OpenClipboardEmptyClipboardGlobalAllocGlobalLockCopyMemorySetClipboardDataGlobalUnlockGlobalFreeCloseClipboardSessionApplication' MacroName: MarcPaste ' MacroDescription: Paste Libs-formulated MARC data from the clipboard ' Written by: Joel Hahn, Niles Public Library District Option Explicit Const CF_TEXT = 1 Const GMEM_SHARE = &H2000 'optional Const GMEM_MOVEABLE = &H2 Const GMEM_ZEROINIT = &H40 Const FOR_CLIPBOARD = GMEM_MOVEABLE Or GMEM_ZEROINIT Or GMEM_SHARE 'may omit GMEM_SHARE Declare Function OpenClipboard Lib "user.dll" (ByVal hwnd As Integer) _ As Integer Declare Function CloseClipboard Lib "user.dll" () As Integer Declare Function EmptyClipboard Lib "user.dll" () As Integer Declare Function SetClipboardData Lib "user.dll" (ByVal wFormat As _ Integer, ByVal hMem As Integer) As Integer Declare Function GetClipboardData Lib "user.dll" (ByVal wFormat As Integer) _ As Integer Declare Function GlobalAlloc Lib "krnl386.exe" (ByVal wFlags As Integer, _ ByVal dwBytes As Long) As Integer Declare Function GlobalLock Lib "krnl386.exe" (ByVal hMem As Integer) As Long Declare Function GlobalUnlock Lib "krnl386.exe" (ByVal hMem As Integer) As _ Integer Declare Function GlobalFree Lib "krnl386.exe" (ByVal hMem As Long) As Integer Declare Sub CopyMemory Lib "krnl386.exe" Alias "hmemcpy" (hpvDest _ As Any, hpvSource As Any, ByVal cbCopy As Long) Declare Function lstrcpy Lib "krnl386.exe" (lpToString As Any, _ lpFromString As Any) As Integer Declare Function lstrlen Lib "krnl386.exe" (ByVal lpString As Any) _ As Integer sub main Dim hMem As Integer Dim pMem As Long Dim retval As Integer Dim OutData$ Dim CS as Session Set CS = CurrentSession If OpenClipboard(0) Then hMem = GetClipboardData(CF_TEXT) pMem = GlobalLock(hMem) retval = lstrlen(ByVal pMem) OutData$ = Space$(retval) retval = lstrcpy(ByVal OutData$, ByVal pMem) 'CopyMemory OutData$, ByVal pMem, Len() retval = GlobalUnlock(hMem) retval = GlobalFree(pMem) retval = CloseClipboard() End If 'OutData$ = Left(OutData$, Len(OutData$)-1) 'MsgBox "/" & OutData$ & "/" CS.Send OutData$ '+Chr(9) end sub Paste Libs-formulated MARC data from the clipboardQ1 Akf\#@  &@#V F CShMempMemretvalOutData_main user.dllkrnl386.exeOpenClipboardGetClipboardDataGlobalLocklstrlenlstrcpyGlobalUnlockGlobalFreeCloseClipboardF FmK+Passport. ~u2\[\  \ 8  \9 \8 i, \8 \ 8\$8]8q2\+ 0`   GMEM_MOVEABLEGMEM_ZEROINITGMEM_SHARECF_TEXTdOpenClipboardGetClipboardDataGlobalLocklstrlenlstrcpyGlobalUnlockGlobalFreeCloseClipboardSessionApplication?ql5&62\Bq l5&62\E SessionApplicationefault timeout for each command is 3 minutes. ' Increase this value if your host requires more time ' for each command. nTimeOut = 15 '180 On Error Resume Next FirstChoiChangeByCallNum_Advanced.SRCRC: ChangeByCallNum_Advanced.DESES:B@ @ChangeByCallNum_Advanced.BININ: CallNumReport.SRC$x'ce: Begin Dialog InitChoice 126, 45, "Choices" CheckBox 8, 12, 78, 10, "Fix any $0.00 prices", .Prices CheckBox 8, 24, 78, 10, "Change Date Added", .Dates OkButton 87, 8, 28, 14 CancelButton 87, 24, 28, 14 End Dialog Dim WhichOne As InitChoice Choice=Dialog(WhichOne) If Choice=0 Then Goto Done If WhichOne.Prices=0 And WhichOne.Dates=0 Then Goto Done If WhichOne.Prices=1 Then Session.Send Chr(1) + "f" End If CS.GetTextInRegion RecNums$, 2, 50, 2, 78 'RecNums$=Session.ScreenText(2,50,1,29) place=Instr(RecNums$, "Records") RecNums$=Right(RecNums$, Len(RecNums$)-place) place2=Instr(RecNums$, "of") CurrRec=Val(Mid(RecNums$, 7, place2-7)) TotalRecs=Val(Mid(RecNums$, place2+2, Len(RecNums$)-place2)) HM$=" Enter the total number of records to change, starting with " HM$=HM$+"the current record."'+Chr(10)+" Use 'A' to change all " 'HM$=HM$+"records from the current record to the end of the list." SecondChoice: Begin Dialog ChangeRecs 126,57,"How Many?" TextBox 4,40,20,12,.HowMany Text 4,4,120,32,HM$ OKButton 28,40,32,12 CancelButton 64,40,32,12 End Dialog Dim HowMany as ChangeRecs HowMany.HowMany=CStr(TotalRecs-CurrRec+1) HMy=Dialog(HowMany) If HMy=0 Then Goto FirstChoice HMany$=HowMany.HowMany 'If InStr(1, HMany$, "A", 1)=0 Then If HMany$="0" Then Goto Done Else howm=Val(HMany$) If howm=0 Then MsgBox "Data must be a number" ' or 'A'" Goto SecondChoice 'ElseIf TotalRecs 0 or 1. Exiting..." ' Exit Do 'End If ' ' '***Included due to timing error ' Session.Send      !"#$%&'()*+,-./01245678:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiklmopqrsvuwxyz{|}~" " ' nTimeOut = 3 ' CS.Receive nTimeout, chr(27) + "[?25h" 'CStr(CurrRec+z) ' nTimeOut = 15 If z<(TotalRecs-CurrRec+2)-1 then Session.Send chr(1) + "H" '[F8] CS.Receive nTimeout, chr(27) + "[?25h" 'CStr(CurrRec+z) end if z=z+1 Loop Until z=(TotalRecs-CurrRec+2) Session.Send Chr(1)+"f" 'S-F6 MsgBox "Done!" Done: end sub Qz9?$d  # ChoicesFix any $0.00 pricesChange Date AddedPricesDates__f Recordsof= Enter the total number of records to change, starting with the current record. How Many?HowMany___0Data must be a numberThere are only  records left in the lisMake advanced changes to items retrieved by a call number searcht! CCS-3!CostAdd  [?25hCCS-3!DateAddedHDone!#V F  F"  0@P`p "( 08SessionCSnTimeOut_WhichOneChoice____RecNums__placeplace2_CurrRecTotalRecsHM_HowManyHMyHManyhowm_zmain5 F FmK+PassportZ~u2\[~u2\[  8  ~- j 5 jN 5jN 5&jW jW j5:je  WU9&q0l5O@P2\Sq 2N2\Y 05d@P`pl! f i"05n@P`pl#ih $ f  0ih &5s ' 5 *( ~9 j( 5 j+(( j,(x  j-((  j.(@(  j/5(j1 02(e33406057890h :;5j<@z@ 0>A6 068jB1CD 0EFHIKkLu622\BNq6H2\SO8Pq 0l6L@P2\TQ8RTkUu6\2\BWq6H2\SX8Yq 0l6L@P2\TZ8[m 0Unq0l6n@P2\Soq 0l6L@P2\Tpr 0s 0Puq0l5O@P2\Sw6rj{ +e:!PricesDatesInitChoice-<HowManyChangeRecsSessionApplication' MacroName: BatchSelect ' MacroDescription: Select a range of records ' Written by: Joel Hahn, Niles Public Library District sub main Dim CCS As Session Set CCS=CurrentSession x=InputBox("How many to select (or unselect)?") If x="" Then Goto Done HowMany%=Val(x) If HowMany MOD 2=0 Then GoFwd%=HowMany%/2 c=0 Do CCS.Send Chr(13)+Chr(27)+"[B"+Chr(13)+Chr(Create a list of items the library owns, based on a call number searchQ,}z$I& o #s 22.00Choices Adult FictionAdult Non-fictionPaperback (trade)Paperback (mass)Juvenile Large TypeGov't DocumentPamphletCassetteCD Video/DVDCD-ROM@ChoiceOptionButton1OptionButton2OptionButton3' MacroName: CallNumReport ' MacroDescription: Create a file of items, based on a call number search (with complex ' truncation) and the Date Added field ' Written by: Joel Hahn, Niles Public Library District sub main Dim CS as Session Set CS = CurrentSession Dim nTimeOut as Integer nTimeOut = 30 Filename$="C:\MyDocu~1\CallOutA.txt" Filename2$="C:\MyDocu~1\CallOutJ.txt" SearchDialog: Begin Dialog InfoDialog 58, 54, 183, 111 Text 10, 2, 81, 8, "Input text to search for." Text 10, 13, 103, 8, "Use * as a wild card character." TextBox 10, 24, 163, 12, .Search Text 10, 52, 85, 8, "Search for items received" OptionGroup .BefAft OptionButton 97, 46, 33, 10, "Before", .Bef OptionButton 97, 57, 27, 10, "After", .Aft Text 131, 52, 35, 8, "this date:" TextBox 10, 70, 71, 12, .SearchDate Text 90, 72, 63, 8, "(i.e. 04/23/1999 )" OkButton 10, 87, 50, 14 CancelButton 63, 87, 50, 14 End Dialog Dim Info as InfoDialog z = Dialog(Info) If z = 0 Then Goto Done Search$ = Trim(Info.Search) BefAft% = Info.BefAft SearchDate$ = Trim(Info.SearchDate) If Left(Search$, 1) = "*" Then MsgBox "You cannot start a search with a wildcard." Info.Search = Search$ Info.BefAft = BefAft% Info.SearchDate = SearchDate$ Goto SearchDialog ElseIf InStr(Mid(Search, 2, 2), "*") Then MsgBox "You cannot have a wildcard in the first three characters." Info.Search = Search$ Info.BefAft = BefAft% Info.SearchDate = SearchDate$ Goto SearchDialog End If If UCase(SearchDate$) = "TODAY" Then SearchDate$ = Left(Date$,2)+"/"+Mid(Date$,4,2)+"/"+Right(Date$,4) End If If SearchDate$ = Left(Date$,2)+"/"+Mid(Date$,4,2)+"/"+Right(Date$,4) And BefAft% = 1 Then MsgBox "You cannot search for items added after today." Info.Search = Search$ Info.BefAft = BefAft% Info.SearchDate = SearchDate$ Goto SearchDialog End If CS.Send Chr(1)+"A" CS.Receive nTimeOut, "" CS.Send "12" CS.Receive nTimeOut, "[?25h" CS.Send Chr(27)+"[A" + Chr(27)+"[A" Today$=Left(Date$,2)+Mid(Date$,4,2)+Right(Date$,4) OrigSearch$ = Search$ place = InStr(Search$, "*") If place>0 Then Mid(Search$, place, 1) = "$" End If CS.Send Search$+Chr(13) CS.Receive nTimeOut, "" '360 CS.GetTextInRegion CheckBad$, 10, 12, 10, 30 If InStr(CheckBad$, "No agency list.") Then CS.Send "2" MsgBox "There were no matching records." Info.Search = Search$ Info.BefAft = BefAft% Info.SearchDate = SearchDate$ Goto SearchDialog End If CS.GetTextInRegion ScnText, 2, 65, 2, 80 place=InStr(ScnText, " of ") j=1 Do while j<=place If Mid(ScnText, j, 1) Like "[0-9]" Then place2=j Exit Do End If j=j+1 Loop CurrRec=Val(Mid(ScnText, place2, place-place2)) EndRec=Val(Mid(ScnText, place+3, Len(ScnText)-place-2)) total=EndRec-CurrRec 'If Left(Search$, 2) = "J/" Then Level="J" Else Level="A" 'If Level="A" Then Filenum%=FreeFile Open Filename$ for Output as Filenum% Print #filenum%, String(20, " ")+"Call Number Search Report -- Adult" Print #filenum%, String(30, " ")+"Run on: "+Date$ Print #filenum%, Print #filenum%, "Search String: " + OrigSearch$ If Sear  chDate$<>"" Then Print #filenum%, "Received: "; If BefAft%=1 Then Print #filenum%, "After "; Else Print #filenum%, "Before "; End If Print #filenum%, SearchDate$ End If Print #filenum%, 'ElseIf Level="J" Then Filenum2%=FreeFile Open Filename2$ for Output as Filenum2% Print #filenum2%, String(20, " ")+"Call Number Search Report -- Juvenile" Print #filenum2%, String(30, " ")+"Run on: "+Date$ Print #filenum2%, Print #filenum2%, "Search String: " + OrigSearch$ If SearchDate$<>"" Then Print #filenum2%, "Received: "; If BefAft%=1 Then Print #filenum2%, "After "; Else Print #filenum2%, "Before "; End If Print #filenum2%, SearchDate$ End If Print #filenum2%, 'End If aya=0 juv=0 curr=0 Do CS.GetTextInRegion Barcode$, 9, 20, 9, 45 Barcode$ = Trim(Barcode$) CS.GetTextInRegion CallNum$, 10, 20, 10, 67 CallNum$ = Trim(CallNum$) CS.GetTextInRegion Scat$, 11, 58, 11, 62 Scat$ = Trim(Scat$) CS.GetTextInRegion DateAdded$, 17, 57, 17, 68 DateAdded$ = Trim(DateAdded$) CS.GetTextInRegion AuthorTitle$, 6, 3, 6, 78 place=InStr(AuthorTitle$, "/") If place=27 Then Author$=Trim(Left(AuthorTitle$, place-1)) Title$=Trim(Right(AuthorTitle$, Len(AuthorTitle$)-place-1)) If Right(Title$, 1)=":" Then Title$=Left(Title$, Len(Title$)-1) CS.GetTextInRegion ATKey$, 5, 67, 5, 77 ATKey$ = Trim(ATKey$) + " 000" Else Title$=Trim(Right(AuthorTitle$, Len(AuthorTitle$)-place-1)) If Right(Title$, 1)=":" Then Title$=Left(Title$, Len(Title$)-1) Title$=Title$+" / "+Trim(Left(AuthorTitle$, place-1)) CS.GetTextInRegion ATKey$, 5, 63, 5, 77 ATKey$ = Trim(ATKey$) 'CS.Send Chr(13) 'CS.Send Chr(1)+"G" 'CS.Receive nTimeOut%, "[?25h" '"A/T Key:" 'CS.GetTextInRegion AT2$, 10, 2, 13, 77 'place=InStr(1, AT2$, "V. AUTHOR") 'If place>0 Then ' Author$=Trim(Mid(AT2$, place+19, 56)) 'End If 'place=InStr(1, AT2$, "V. TITLE") 'If place>0 Then ' Title$=Trim(Mid(AT2$, place+19, 56)) ' CS.GetTextInRegion T2$, 6, 25, 6, 78 ' Title$=Trim(T2$)+" / "+Title$ 'Else ' CS.GetTextInRegion T2$, 6, 25, 6, 78 ' Title$=Trim(T2$) 'End If 'CS.Send Chr(1)+"C" 'CS.Receive nTimeOut%, "" '"[?25h" '"A/T Key:" 'CS.Send Chr(1)+"f" 'Chr(13) End If Search$ = OrigSearch$ place = InStr(Search$, "*") If place>0 Then If (place+1 <= Len(Search$)) Then MidSearch$="" RightSearch$ = Mid(Search$, place+1) place2 = InStr(RightSearch$, "*") If place2>0 Then If place2+1 <= Len(RightSearch$) Then MidSearch$ = Left(RightSearch$, place2-1) RightSearch$ = Mid(RightSearch$, place2+1) Else MidSearch$ = Left(RightSearch$, place2-1) RightSearch$="" End If End If Else RightSearch$="" MidSearch$="" End If End If RightSearch$ = Trim(RightSearch$) MidSearch$ = Trim(MidSearch$) If MidSearch$<>"" And RightSearch$="" Then If InStr(place, UCase(CallNum$), UCase(MidSearch$)) Then match = 1 Else match = 0 ElseIf MidSearch="" And RightSearch$<>"" Then If UCase(Right(CallNum$, Len(RightSearch$))) = UCase(RightSearch$) Then match = 1 Else match = 0 ElseIf MidSearch$<>"" And RightSearch$<>"" Then If InStr(place, UCase(CallNum$), UCase(MidSearch$)) and UCase(Right(CallNum$, Len(RightSearch$))) = UCase(RightSearch$) Then match = 1 Else match = 0 Else match=1 End If If match = 1 Then If SearchDate<>"" Then DACheck$=DateAdded$ SDCheck$=SearchDate$ DACheck$=Right(DACheck$, 4)+Left(DACheck$, 2)+Mid(DACheck$, 4, 2) SDCheck$=Right(SDCheck$, 4)+Left(SDCheck$, 2)+Mid(SDCheck$, 4, 2) Select Case BefAft Case 0 If Val(DACheck$)=Val(SDCheck$) Then match=1 Else match=0 End Select End If End If '***** 'Routine to add info to file If match = 1 Then 'Filenum% = FreeFile If Left(CallNum$, 2) = "J/" Then ' Open Filename2$ for Append as Filenum% ' juv=1 'Else ' Open Filename$ for Append as Filenum% ' aya=1 'End If Print #filenum2%, String(78, "*") Print #filenum2%, Print #filenum2%, Title$ Print #filenum2%, ATKey$, If Author$<>"" Then Print #filenum2%, String(4, " ")+"Author: "+Author$ Else Print #filenum2%, End If Print #filenum2%, Barcode$,,Scat$,"Date Added: " + DateAdded$ Print #filenum2%, "Call Number: "+CallNum$ Print #filenum2%, juv=1 Else Print #filenum%, String(78, "*") Print #filenum%, Print #filenum%, Title$ Print #filenum%, ATKey$, If Author$<>"" Then Print #filenum%, String(4, " ")+"Author: "+Author$ Else Print #filenum%, End If Print #filenum%, Barcode$,,Scat$,"Date Added: " + DateAdded$ Print #filenum%, "Call Number: "+CallNum$ Print #filenum%, aya=1 End If End If '***** Looper: If curr12[?25h[A$No agency list.2There were no matching records. of [0-9] "Call Number Search Report -- AdultRun on: Search String: Received: After Before %Call Number Search Report -- Juvenile: 000 / J/Author: Date Added: Call Number: HCDone;#7V F " ( 8(0:JZjz8@HPX`hpx"$&6FVCSnTimeOutFilenameFilename2_InfozSearch_BefAftSearchDate________________TodayOrigSearchplaceCheckBadScnTextjplace2CurrRecEndRectotalFilenumFilenum2ayajuvcurrBarcodeCallNumScatDateAddedAuthorTitleAuthorTitleATKeyMidSearchRightSearchmatchDACheckSDCheckmain5F FmK+Passportr~u2\[ 855  :6o j Q 5; jg 5W j j4U 5y ja.! 5ja9 5j4# 5 jFG jZH? 5 jW2 j?W2 j5je(( i88   i(! i5>"6 j#$88%( &'n':5JZ 0ijzl7(6- j)*88+( ,m-/ (i6i\00 i(i6q8H@i(iP6qXh`i(ip(13(0 i(i6q8H@i(iP6qXh`i(ip8U746u j56887( 8Q9;q:l6JZ 2\q 6 2\?q:l6JZjl z6 2\A@ i(i80i(iHXPi(i`xCD:5JZjzlEF6jwGIqJ:lZ 2\Jq 6 2\Kq2\L:6JZjzlLMq6 2\N6 jOP88Q( R SUq AP2\ :V:6JZjlWX_Y:Jl6"ZlZ[\] :^_:Jl h `ZJlOptionButton4OptionButton5OptionButton6OptionButton7OptionButton8OptionButton9OptionButton10OptionButton11OptionButton12_45.0020.006.0018.0024.0015.003.0010.0017.0038.00$0.00$1.00 [?25hG Last Activity25.00C[BJ continue. d#V F  F" 8HX hxSessionCSDefaultPricenTimeOut_WhichT :jl h afeA"8g""jCh"jP:6* l6.JZjjjQi"jP:6* l6SJZ0i(jzjjQj"jPjRjQk"jP6^ jWjQl(7um"jP6pjWjQn8o"jP6}jWjQpq"jP6jWjQrs"jP(jWjQtu"jPjRjQweA$8x$"jCy$jP:6* l6JZjjjQz$jP:6* l6SJZ0i(jzjjQ{$jPjRjQ|$jP6^ jWjQ}(7u~$jP6pjWjQ8$jP6}jWjQ$jP6jWjQ$jP(jWjQ$jPjRjQ&6Fq-2\ iqC2\ iq:>2\ iq9D2\ iqN2\:6qJZjzl 0ii 0 f ii i6( f GiqCM2\ i60 0 f ii i6( f Gi6 08ii@q?M2\ i:5JZjzlO : f 7  :0i:5JZjzl : f N i  :0iƍ, i7ˍ77 i i77Ug:0iJZ ijzlԒVԍ ԑVՍ377U\ 0 f ii8i֒V֍ ֑V׍77U:0iJZ ijzl8@ f iiHiؒV؍ ؑVٍ ڒVVz(7i( i0i8@HiP i0i8@HiP8f8f_h h qV V7 VKf<h h V VV i6W$jP:5 NlJjjQ$jPjRjQ$jPjWjQ$jPjWjQ7J$jP:6* l6JZjzjjQ$jPjRjQ$jPjWjRjW6 jWjQ$jP6 jWjQ$jPjRjQ6V"jP:5 NlJjjQ"jPjRjQ "jPjWjQ "jPjWjQ 7L "jP:6* l6JZjzjjQ "jPjRjQ"jPjWjRjW6 jWjQ"jP6 jWjQ"jPjRjQ&FWq:l6JZ 2\q :l6JZ 2\F :F F"q:l6JZ 2\#q 6 2\'"jP:5 NlJjjQ("j>,$jP:5 NlJjjQ-"j>/& /j:06 0j:26 j5` N SearchBefAftSearchDateInfoDialogdSessionApplicationypeTypeChoiceCheckExistingPrice____CheckPrice__main5F FmK+Passport ~u2\[~u2\[ 58 l j 5 j0 5jH 5'j$@ 5;j0D 5Oj<$ 5bjH2 5mjT< 5zjT( 5jT$$ 5jT0 5jT<, 5jTH$ 5j,X j!5j$8%e'.8((.)5*z*.+6t,W,.-6|.4../600.1622.3644.5666.7688.96:b:.;6<?<.=6>>.?6|oq :@2\pir660W#tq8l2\uq 8l6HX2\wq8l6HX2\xq 62\{q  2\| i ~ 6 ~ q8l6HX2\q 8l6HX2\q8l6HX2\q8l6HX2\q8l6HX2\q8l6HX2\q8l6HX2\q8l6HX2\q8l6HX2\q8l6HX2\q 8l6HX2\q H8lX6hx2\q 62\q6(2\q 8l6HX2\> ,ChoiceTypeChoiceBSessionApplicationst. CS.Receive nTimeout, chr(27) + "[?25h" CS.Send " " 'Uses spacebar for "any key" ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" CS.Send chr(1) + "c" 'Shift-F3 done: End Sub >Q"$Zu# Barcode EntryLocalSystemItemHBCode@HoldOptionsOptionButton1OptionButton2OptionButton3OKCancel MAINTENANCEp n[?25hK[13;49H231 cN7># V F ." For records which have a price of $0.00, check and enter the correct costFPRbrCSnTimeOutRowText__WhichButton_BCodeDialogbarcodeHoldType___mainCostAdd.BING; DateAdded.SRCDateAdded.DESKI=DateAdded.BIN 5F FmK+Passport~u2\[ < 8 qN2\ . A: j 5> j< j 5> j  5>(j  5>1j* j * j5>8jFe..FNP85>Rbrl-ql5>Rb2\& ql5>Rb2\!#q l5>Rb2\%ql5>Rb2\'q l5>Rb2\)qRlb2\+q l5>Rb2\2P3q5>2\4;4P5q5>2\67q5>ũ2\8:q l5>Rb2\Rb2\>q l5>Rb2\@q5>ɩ2\Bq l5>Rb2\Dql5>Rb2\GO = LDBCodeHoldOptionsBarcodesSSessionApplication' MacroName: FindNote1Note2 ' MacroDescription: Go Forward untiEstimate and enter a reasonable date for the Date Added field1)+"E" CCS.Receive 2, "[?25h" c=c+1 Loop Until c>=GoFwd% Else GoFwd%=(HowMany%+1)/2 c=1 Do CCS.Send ' MacroName: DateAdded ' MacroDescription: Estimate and enter a reasonable date for the Date Added field ' Written by: Joel Hahn, Niles Public Library District sub main Dim Session as Session Set Session = CurrentSession Dim CS as Session Set CS = CurrentSession Dim nContinue as Integer Dim nTimeOut as Integer Dim DateAdd$ Dim DateAddOld$ Dim CurrDate$ ' The default timeout for each command is 3 minutes. ' Increase this value if your host requires more time ' for each command. nTimeOut = 180 On Error Resume Next 'RecNums$=Session.ScreenText(2,50,1,29) 'place=Instr(RecNums$, "Records") 'RecNums$=Right(RecNums$, Len(RecNums$)-place) 'place2=Instr(RecNums$, "of") 'CurrRec=Val(Mid(RecNums$, 7, place2-7)) 'TotalRecs=Val(Mid(RecNums$, place2+2, Len(RecNums$)-place2)) ' 'HM$=" Enter the total number of records to change, starting with " 'HM$=HM$+"the current record."'+Chr(10)+" Use 'A' to change all " ''HM$=HM$+"records from the current record to the end of the list." 'ThirdChoice: 'Begin Dialog ChangeRecs ,,126,57,"How Many?" ' TextBox 4,40,20,12,.HowMany ' Text 4,4,120,32,HM$ ' OKButton 28,40,32,12 ' CancelButton 64,40,32,12 'End Dialog 'Dim HowMany as ChangeRecs 'HowMany.HowMany=CStr(TotalRecs-CurrRec+1) 'HMy=Dialog(HowMany) 'If HMy=0 Then Goto Done 'HMany$=HowMany.HowMany ''If InStr(1, HMany$, "A", 1)=0 Then ' If HMany$="0" Then ' Goto Done ' Else ' howm=Val(HMany$) ' If howm=0 Then ' Chr(13)+Chr(27)+"[B"+Chr(13)+Chr(1)+"E" CCS.Receive 2, "[?25h" c=c+1 Loop Until c>=GoFwd% CCS.Send Chr(13) CCS.Receive 2, "[?25h" End If MsgBox "Done!" Done: end sub QPz$ "#&!How many to select (or unselect)?[BE [?25hDone!$P#V F 468HXhxCCSx__HowManyGoFwdc__________mainF FmK+Passport"~u2\[5,l  7 h 484R 4 @P68 8  qlHl X5,)hxl l 5.2\2 q5,82\@8 886b4B @P688qlHl X5,)hxl l 5.2\2q5,82\@8 886bql2\2q5,82\@5,Hj SessionApplicationl desired text is found in either Note 1 or Note 2 ' Written by: Joel Hahn, Niles Public Library District Sub main ' Go forward (F8) a certain number of records or items Dim CS as session Set CS = CurrentSession Dim nTimeOut as Integer nTimeOut = 60 CS.GetTextInRegion CallerCheck$, 3, 1, 3, 79 If InStr(1, CallerCheck$, "BIB/ITEM MAINTENANCE - Call Number Search")=0 Then MsgBox "You are not viewing a call number search" Goto Done End If CS.GetTextInRegion ScnText, 2, 65, 2, 80 place=InStr(ScnText, " of ") j=1 Do while j<=place If Mid(ScnText, j, 1) Like "[0-9]" Then place2=j Exit Do End If j=j+1 Loop CurrRec=Val(Mid(ScnText, place2, place-place2)) 'EndRec=Val(Right(ScnText, Len(ScnText)-place-3)) EndRec=Val(Mid(ScnText, place+3, Len(ScnText)-place-2)) CS.GetTextInRegion CurrScat$, 11, 58, 11, 63 CurrScat$=Trim(CurrScat$) DoDialog: Begin Dialog UserDialog 166,45,"Find Text" Text 4,8,70,8,"Type the text to find:" TextBox 76,6,84,12,.Text OKButton 7 MsgBox "Data must be a number" ' or 'A'" ' Goto ThirdChoice ' 'ElseIf TotalRecs ebYes then End 'end if ' 'Session.Send " " ' '' Wait for response from host. 'Session.StringWait.Timeout = nTimeout 'Session.StringWait.MatchStringExact chr(27) + "[?25h" 'if Session.StringWait.Start = smlWAITTIMEOUT then ' nContinue = QuerySyncError() ' if nContinue <> ebYes then End 'end if ' 'Sleep(500) CS.GetTextInRegion Barcode$, 9, 20, 9, 38 Barcode$=Trim(Mid(Barcode$, 8, 6)) 'Barcode$=Trim(Mid(Session.ScreenText(9, 20, 1, 19), 8, 6)) BcNum=Val(Barcode$) CS.GetTextInRegion DateAddOld$, 17, 58, 17, 67 DateAddOld$=Trim(DateAddOld$) CurrDate$=Date$ Mid(CurrDate$, 3, 1)="/" Mid(CurrDate$, 6, 1)="/" xpos=CS.CursorRow ypos=CS.CursorColumn If Trim(DateAddOld$)="" Then Session.Send DateAdd$ + Chr(1) + "J" CS.Receive nTimeout, chr(27) + "[?25h" Session.Send " " CS.Receive nTimeout, chr(27) + "[?25h" On Error Resume Next CS.Receive 1, chr(27) + "[?25h" On Error Goto 0 Else If xpos<>8 or ypos<>30 Then Session.Send DateAdd$ + Chr(1) + "J" CS.Receive nTimeout, chr(27) + "[?25h" Session.Send " " CS.Receive nTimeout, chr(27) + "[?25h" On Error Resume Next CS.Receive 1, chr(27) + "[?25h" On Error Goto 0 End If If DateAddOld$=CurrDate$ Then Goto GoOn If (Right(DateAddOld$,4)="1999" And Val(Left(DateAddOld$,2)) >= 5) And BcNum >= 725 Then Goto Done If Val(Right(DateAddOld$,4))<1999 Then Goto Done End If GoOn: Select Case BCNum Case 1 To 9 DateAdd$="01/01/1965" Case 10 To 49, 140 To 149 DateAdd$="01/01/1970" Case 90 To 95, 100 To 109, 130 To 139, 176 To 189, 200 To 399 DateAdd$="01/01/1975" Case 122 To 126 DateAdd$="01/01/1978" Case 70 To 89, 196 To 197 DateAdd$="01/01/1980" Case 115 To 121, 198 To 199 DateAdd$="01/01/1982" Case 127 To 129 DateAdd$="01/01/1983" Case 50 To 69, 150 To 175, 190 To 195 DateAdd$="01/01/1985" Case 410 To 419 DateAdd$="01/01/1988" Case 96 To 99, 110 To 114, 400 To 409, 420 To 429 DateAdd$="01/01/1989" Case 430 To 474 DateAdd$="01/01/1990" Case 475 To 499 DateAdd$="01/01/1991" Case 500 To 529 DateAdd$="01/01/1992" Case 530 To 574 DateAdd$="01/01/1994" Case 575 To 599 DateAdd$="01/01/1995" Case 600 To 639 DateAdd$="01/01/1996" Case 640 To 669 DateAdd$="01/01/1997" Case 670 To 699 DateAdd$="01/01/1998" Case Else DateAdd$="01/01/1999" End Select Session.Send Chr(27)+"[A" Session.Send Chr(27)+"[A" Session.Send Chr(27)+"[A" CS.Receive nTimeout, chr(27) + "[?25h" Session.Send DateAdd$ + Chr(1) + "J" CS.Receive nTimeout, chr(27) + "[?25h" Session.Send " " CS.Receive nTimeout, chr(27) + "[?25h" CS.Receive 1, chr(27) + "[?25h" ' If z<(TotalRecs-CurrRec+2)-1 then ' Session.Send chr(1) + "H" ' ' ' Wait for response from host. ' Session.StringWait.Timeout = nTimeout ' Session.StringWait.MatchStringExact chr(27) + "[?25h" ' sleep(100) ' if Session.StringWait.Start = smlWAITTIMEOUT then ' nContinue = QuerySyncError() ' if nContinue <> ebYes then End ' end if ' Sleep(150) ' End If ' z=z+1 ' Loop Until z=(TotalRecs-CurrRec+2) ' MsgBox "Done!" Done: end su6,24,40,14 CancelButton 120,24,40,14 End Dialog Dim Recs as UserDialog z = Dialog(Recs) If z = 0 Then Goto Done a$=Recs.Text ' total=Val(Recs.Num) ' If total>EndRec-CurrRec Then total=EndRec-CurrRec total=EndRec-CurrRec CS.GetTextInRegion CheckYA$, 18, 14, 19, 78 CheckYA$=Trim(CheckYA$) curr=1 Do While curr<=total CS.GetTextInRegion CheckYA$, 18, 14, 19, 78 CheckYA$=Trim(CheckYA$) 'MsgBox CheckScat$ If InStr(1, CheckYA$, Recs.Text, 1)>0 Then MsgBox "Found " & Chr(34) & Recs.Text & Chr(34) Exit Do End If CS.Send chr(1) + "H" ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" curr=curr+1 Loop If curr>total Then MsgBox "End of list" 'Goto Done End If 'Set LockStep = Nothing Done: End Sub Q,$Gj#FindNote1Note2.SRC&cFindNote1Note2.DES&ZO4HoldingsReport.SRC&!!HoldingsReport.BIN&L)BIB/ITEM MAINTENANCE - Call Number Search(You are not viewing a call number search of [0-9] Find TextType the text to find: _Text__Found H [?25h End of listQ#V F &6FVfv' MacroName: ScatNotSameSearch ' MacroDescription: Go Forward until a different scat is found ' Written by: Joel Hahn, Niles Public Library District Sub main ' Go forward (F8) a certain number of records or items Dim CS as session Set CS = CurrentSession Dim nTimeOut as Integer nTimeOut = 60 CS.GetTextInRegion CallerCheck$, 3, 1, 3, 79 If InStr(1, CallerCheck$, "BIB/ITEM MAINTENANCE - Call Number Search")=0 Then MsgBox "You are not viewing a call number search" Goto Done End If CS.GetTextInRegion ScnText, 2, 65, 2, 80 place=InStr(ScnText, " of ") j=1 Do while j<=place If Mid(ScnText, j, 1) Like "[0-9]" Then place2=j Exit Do End If j=j+1 Loop CurrRec=Val(Mid(ScnText, place2, place-place2)) 'EndRec=Val(Right(ScnText, Len(ScnText)-place-3)) EndRec=Val(Mid(ScnText, place+3, Len(ScnText)-place-2)) CS.GetTextInRegion CurrScat$, 11, 58, 11, 63 CurrScat$=Trim(CurrScat$) DoDialog: Begin Dialog UserDialog 125, 45, "Find Scats" Text 4, 8, 76, 8, "Type the 'correct' scat:" TextBox 82, 6, 36, 12, .Num OkButton 34, 24, 40, 14 CancelButton 78, 24, 40, 14 End Dialog Dim Recs as UserDialog Recs.Num = CurrScat$ z = Dialog(Recs) If z = 0 Then Goto Done a$=Recs.Num i=1 : alph=0 Do If Mid(a$, i, 1) Like "[!0-9]" Then alph=1 Exit Do End If i=i+1 Loop While i<=Len(a$) If (alph=1 or a$="") Then MsgBox "Numbers only, please." Goto DoDialog End If ' total=Val(Recs.Num) ' If total>EndRec-CurrRec Then total=EndRec-CurrRec total=EndRec-CurrRec CS.GetTextInRegion CheckScat$, 11, 58, 11, 63 CheckScat$=Trim(CheckScat$Go Forward (F8) a certain number of records or items) curr=1 Do While CheckScat$=Recs.Num And curr<=total CS.GetTextInRegion CheckScat$, 11, 58, 11, 63 CheckScat$=Trim(CheckScat$) 'MsgBox CheckScat$ If CheckScat$<>Recs.Num Then Exit Do CS.Send chr(1) + "H" ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" curr=curr+1 Loop If curr>total Then MsgBox "End of list" Goto Done End If 'Set LockStep = Nothing MsgBox "Bad Scat! Bad!" '"Done!" Done: End Sub QW$F7}#)BIB/ITEM MAINTENANCE - Call Number Search(You are not viewing a call number search of [0-9] Find ScatsType the 'correct' scat: _Num__[!0-9]Numbers only, please.H [?25h End of listBad Scat! Bad![)#V F &6FVfv"  (0CSnTimeOutCallerCheck______ScnTextplacejplace2CurrRecEndRecCurrScat_Recszaialph_totalCheckScat     !"#$%&'()*+,-./012456789:;<=>?@BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcefghijklmnopqrstuvwxyz{}~currmain5F FmK+Passportp~u2\[< 8 qO2\ 5&6FVl 5<j  qfAP2\f5g&6fFlvv\f&l5n6l vf&lh 6&flvv fFlh q:?2\i! }- j 5v j"L 5 j#R$ j$"( j%N( jCreate a list of items the library owns, based on a call number search&5j()e**'+ ,,-.' MacroName: HoldingsReport ' MacroDescription: Create a list of items the library owns, based on a call number search ' Written by: Joel Hahn, Niles Public Library District sub main Dim CS as Session Set CS = CurrentSession Dim nTimeOut as Integer nTimeOut = 30 Begin Dialog InfoDialog 58, 54, 186, 92 GroupBox 2, 0, 61, 89, "Format" OptionGroup .Format OptionButton 6, 8, 56, 9, "Videocassette", .VHS OptionButton 6, 20, 25, 9, "DVD", .DVD OptionButton 6, 31, 19, 9, "CD", .CD OptionButton 6, 43, 38, 9, "Cassette", .Cass OptionButton 6, 54, 56, 9, "Book on Tape", .BOT OptionButton 6, 66, 47, 9, "Book on CD", .BOCD OptionButton 6, 77, 37, 9, "CD-ROM", .CDROM GroupBox 65, 0, 43, 35, "Level" OptionGroup .Level OptionButton 69, 8, 27, 9, "Adult", .Adult OptionButton 69, 20, 37, 9, "Juvenile", .Juv GroupBox 66, 35, 43, 32, "Output" OptionGroup .Output OptionButton 69, 43, 25, 9, "Text", .Text OptionButton 69, 54, 30, 9, "HTML", .HTML OkButton 130, 6, 50, 14 CancelButton 130, 23, 50, 14 End Dialog Dim Info as InfoDialog Info.Format=0 Info.Level=0 Info.Output=1 z = Dialog(Info) If z = 0 Then Goto Done a%=Info.Format b%=Info.Level c%=Info.Output CS.Send Chr(1)+"A" CS.Receive nTimeOut, "" CS.Send "12" CS.Receive nTimeOut, "[?25h" CS.Send Chr(27)+"[A" + Chr(27)+"[A" Search$="" FNF=0 If Info.Level=1 Then Search$="J/" Select Case Info.Format Case 0 Search$=Search$+"VIDEO$" AVFormat$="VID" TitleFormat$="Videocassette" FNF=1 Case 1 Search$=Search$+"DVD$" AVFormat$="DVD" TitleFormat$="DVD" Case 2 Search$=Search$+"CD/$" AVFormat$="CDS" TitleFormat$="Compact Disc" Case 3 Search$=Search$+"CASS$" AVFormat$="CAS" TitleFormat$="Cassette" Case 4 Search$=Search$+"BOOK ON TAPE$" AVFormat$="BOT" TitleFormat$="Books on Tape" Case 5 Search$=Search$+"BOOK ON CD$" AVFormat$="BOC" TitleFormat$="Books on CD" Case 6 Search$=Search$+"CD-ROM$" AVFormat$="CDR" TitleFormat$="CD-ROM" End Select If Info.Level=1 then AVFormat$="J"+AVFormat$ TitleFormat$="Juvenile "+TitleFormat$ End If Today$=Left(Date$,2)+Mid(Date$,4,2) '+Right(Date$,4) Select Case Info.Output Case 0 Filename$="C:\MyDocu~1\"+AVFormat$+".txt" '+Today$+".txt" If FNF=1 Then Filename2$="C:\MyDocu~1\"+AVFormat$+"nf.txt" '+Today$+".txt" End If Case 1 Filename$="C:\MyDocu~1\"+AVFormat$+".htm" '+Today$+".htm" If FNF=1 Then Filename2$="C:\MyDocu~1\"+AVFormat$+"nf.htm" '+Today$+".htm" End If End Select CS.Send Search$+Chr(13) CS.Receive 360, "" CS.GetTextInRegion ScnText, 2, 65, 2, 80 place=InStr(ScnText, " of ") j=1 Do while j<=place If Mid(ScnText, j, 1) Like "[0-9]" Then place2=j Exit Do End If j=j+1 Loop CurrRec=Val(Mid(ScnText, place2, place-place2)) EndRec=Val(Mid(ScnText, place+3, Len(ScnText)-place-2)) total=EndRec-CurrRec If Info.Output=1 Then Filenum%=FreeFile Open Filename$ for Output as Filenum% Print #filenum%, ""+TitleFormat$+" Holdings" Print #filenum%, "" Print #filenum%, ""+TitleFormat$+" Holdings
" Print #filenum%, "As of "+Date$+"" Print #filenum%, Print #filenum%, "


" Close Filenum% If FNF=1 Then Filenum%=FreeFile Open Filename2$ for Output as Filenum% Print #filenum%, ""+TitleFormat$+" Holdings" Print #filenum%, "" Print #filenum%, "Non-Fiction "+TitleFormat$+" Holdings
" Print #filenum%, "As of "+Date$+"" Print #filenum%, Print #filenum%, "


" Close Filenum% End If End If curr=0 Do CS.GetTextInRegion CallNum$, 10, 20, 10, 67 CallNum$=Trim(CallNum$) CS.GetTextInRegion Scat$, 11, 58, 11, 62 Scat$=Trim(Scat$) If Info.Level=0 And Left(CallNum$, 2)="J/" Then Goto Looper If Info.Format=2 and Left(CallNum$, 6)="CD-ROM" Then Goto Looper If Info.Format=2 and Info.Level=1 and Left(CallNum$, 8)="J/CD-ROM" Then Goto Looper CS.GetTextInRegion AuthorTitle$, 6, 3, 6, 78 place=InStr(AuthorTitle$, "/") If place=27 Then Author$=Trim(Left(AuthorTitle$, place-1)) Title$=Trim(Right(AuthorTitle$, Len(AuthorTitle$)-place-1)) If Right(Title$, 1)=":" Then Title$=Left(Title$, Len(Title$)-1) Else Title$=Trim(Right(AuthorTitle$, Len(AuthorTitle$)-place-1)) If Right(Title$, 1)=":" Then Title$=Left(Title$, Len(Title$)-1) Title$=Title$+" / "+Trim(Left(AuthorTitle$, place-1)) 'CS.Send Chr(13) 'CS.Send Chr(1)+"G" 'CS.Receive nTimeOut%, "[?25h" '"A/T Key:" 'CS.GetTextInRegion AT2$, 10, 2, 13, 77 'place=InStr(1, AT2$, "V. AUTHOR") 'If place>0 Then ' Author$=Trim(Mid(AT2$, place+19, 56)) 'End If 'place=InStr(1, AT2$, "V. TITLE") 'If place>0 Then ' Title$=Trim(Mid(AT2$, place+19, 56)) ' CS.GetTextInRegion T2$, 6, 25, 6, 78 ' Title$=Trim(T2$)+" / "+Title$ 'Else ' CS.GetTextInRegion T2$, 6, 25, 6, 78 ' Title$=Trim(T2$) 'End If 'CS.Send Chr(1)+"C" 'CS.Receive nTimeOut%, "" '"[?25h" '"A/T Key:" 'CS.Send Chr(1)+"f" 'Chr(13) End If 'CS.GetTextInRegion Author$, 6, 3, 6, 28 'Author$=Trim(Author$) 'If Left(Author$,1) Like "[0-9]" Then ' place=InStr(1, Author$, " ") ' If place<>0 Then ' Author$=Trim(Right(Author$, Len(Author$)-place-1)) ' Else ' Author$="" ' End If 'End If 'CS.GetTextInRegion Title$, 6, 30, 6, 78 'Title$=Trim(Title$) 'If Left(Title$,1)="/" Then ' Title$=Right(Title$, Len(Title$)-2) 'End If '***** 'Routine to add info to file 'MsgBox Author$+Chr(10)+Title$+Chr(10)+CallNum$ 'Filename$="C:\"+AVFormat$+Today$+".txt" NFScat$=",22,238,239," Filenum%=FreeFile If Info.Format=0 and (InStr(1,NFScat$, ","+Scat$+",")>0) Then Open Filename2$ for Append as Filenum% Else Open Filename$ for Append as Filenum% End If Select Case Info.Output Case 0 Print #filenum%, Title$ If Author$<>"" Then Print #filenum%, "Author: "+Author$ End If Print #filenum%, "Call Number: "+CallNum$ Print #filenum%, Case 1 Print #filenum%, "

"+Title$+"
" If Author$<>"" Then Print #filenum%, "Author: "+Author$+"
" End If Print #filenum%, "Call Number: "+CallNum$+"" Print #filenum%, End Select Close Filenum% '***** Looper: If curr


" Print #filenum%, "finis" Print #filenum%, "" Print #filenum%, "" Close Filenum% If FNF=1 Then Filenum%=FreeFile Open Filename2$ for Append as Filenum% Print #filenum%, "


" Print #filenum%, "finis" Print #filenum%, "" Print #filenum%, "" Close Filenum% End If End If MsgBox "Done" Done: end sub Qrx$fg#kFormat VideocassetteDVDCDCassette Book on Tape Book on CDCD-ROMLevelAdultJuvenileOutputTextHTMLU_@FormatVHSDVDCDCassBOTBOCDCDROM_@LevelAdultJuv_@OutputTextHTML__A 12[?25h[AJ/VIDEO$VIDDVD$CD/$CDS Compact DiscCASS$CAS BOOK ON TAPE$BOT Books on Tape BOOK ON CD$BOC Books on CDCD-ROM$CDRHoldingsReport.DES&MN FScatNotSameSearch.SRC,m ScatNotSameSearch.BIN,ScatNotSameSearch.DES,RQ34J Juvenile C:\MyDocu~1\.txtnf.txt.htmnf.htm of [0-9] �� Holdings# Holdings
As of 


Non-Fiction J/CD-ROM/: / ,22,238,239,,Author: Call Number: 



Call Number: H finisDoneG#1V F " ,.02BRbr (08@HPX.0`hpxJZjzCSnTimeOut_Infozabc________SearchFNFAVFormatTitleFormat____TodayFilenameFilename2ScnTextplacejplace2CurrRecEndRectotalFilenumcurrCallNumScatAuthorTitleAuthorTitleNFScat_______main5F FmK+Passportl~u2\[ 8:6\ j=Y 5 j  8 5j  5j  5$j +& 5)j68 54jB/ 5CjM% 5PjA+# 5Y jE 5ajE% 5ijB#+ 5t jE+ 5}jE6 5j2 j2 j5j888 e!!",8#.8$08&q2l5BR2\'q 52\(q52\)q 62\*q2l6 BRbl r6 2\ (i5&l/0112 3  f 4 755j6:7;=q0:?2\>0i0?@0Bq0:?2\C0i0E0EmGql5&62\Iq l5&62\K L.MN5jOPS5jV; )u1NumUserDialog?SessionApplication' MacroName: ScatSearch ' MacroDescription: Go Forward until a particular scat is found ' Written by: Joel Hahn, Niles Public Library District Sub main ' Go forward (F8) a certain number of records or items Dim CS as session Set CS = CurrentSession Dim nTimeOut as Integer nTimeOut = 60 CS.GetTextInRegion CallerCheck$, 3, 1, 3, 79 If InStr(1, CallerCheck$, "BIB/ITEM MAINTENANCE - Call Number Search")=0 Then MsgBox "You are not viewing a call number search" Goto Done End If CS.GetTextInRegion ScnText, 2, 65, 2, 80 place=InStr(ScnText, " of ") j=1 Do while j<=place If Mid(ScnText, j, 1) Like "[0-9]" Then place2=j Exit Do End If j=j+1 Loop CurrRec=Val(Mid(ScnText, place2, place-place2)) 'EndRec=Val(Right(ScnText, Len(ScnText)-place-3)) EndRec=Val(Mid(ScnText, place+3, Len(ScnText)-place-2)) CS.GetTextInRegion CurrScat$, 11, 58, 11, 63 CurrScat$=Trim(CurrScat$) DoDialog: Begin Dialog UserDialog 119, 45, "Find Scats" Text 4, 8, 70, 8, "Type the scat to find:" TextBox 76, 6, 36, 12, .Num OkButton 28, 24, 40, 14 CancelButton 72, 24, 40, 14 End Dialog Dim Recs as UserDialog Recs.Num = CurrScat$ z = Dialog(Recs) If z = 0 Then Goto Done a$=Recs.Num i=1 : al,7-..6/800C162635 455466%7585 9X98:6,;63<69 ==6>6H?6P@5) AA8B6VC6fD6l EE8F6|G6H6 I>I/J6K6L5P N*O6P6  QS8i(i0(i(i@HT8UU[V66(PWX66(XYZcZT[66(P\]66(X^aqB2lR2\bq h52\dqAP2\2e26BRblfg_h2Bl6Rlijkl 2mn2Blh oRBl 2blh prseA.8t."PjCu.jP6 6(jWjQv.jP62jWjQw.jP6X 6i(jWjQx.jP6i((60jWjQy.jPjRjQz.jP6jWjQ{.j>|}eA.8~."XjC.jP6 6(jWjQ.jP62jWjQ.jP6 6i(jWjQ.jP6i((60jWjQ.jPjRjQ.jP6jWjQ.j>0q`C2\`i`qh:>2\hih`i6UT`i5PU*U`i6UqpN2\26BRpbrl(piix( pf piii6( f Gi( pf piii6( f Gi6(0pii86ȑeA.826h6(BRbrlʑ.#XjCˍ̑.#PjC@8Ѝ@~.jPjWjQx7.jP6xjWjQ.jP6`jWjQ.jPjRjQ׍@.jP66(jWjQx7).jP6x6*(jWjQ.jP61B2"lR6Lbr"l 6BZJZ`jz6^jjQ.jPjRjQ.j>0Uq2l6hBR2\q 2l6BR2\0 200*eA.8.#PjC.jP6jWjQ.jP6ljWjQ.jP6{jWjQ.jP6jWjQ.j>eA.8.#XjC.jP6jWjQ.jP6ljWjQ.jP6{jWjQ.jP6jWjQ.j>6j[ I jFormatLevelOutputInfoDialog_SessionApplication' for each command. nTimeOut = 180 On Error Resume Next Begin Dialog TypeChoice 162,108,"Choices" OptionGroup .Choice OptionButton 8,12,48,8,"Adult Fiction",.OptionButton1 OptionButton 8,24,72,8,"Adult Non-fiction",.OptionButton2 OptionButton 8,36,64,8,"Paperback (trade)",.OptionButton3 OptionButton 8,48,68,8,"Paperback (mass)",.OptionButton4 OptionButton 8,60,36,8,"Juvenile",.OptionButton5 OptionButton 8,72,50,8,"Large Type",.Opph=0 Do If Mid(a$, i, 1) Like "[!0-9]" Then alph=1 Exit Do End If i=i+1 Loop While i<=Len(a$) If (alph=1 or a$="") Then MsgBox "NuGo Forward (F8) a certain number of records or itemsmbers only, please." Goto DoDialog End If ' total=Val(Recs.Num) ' If total>EndRec-CurrRec Then total=EndRec-CurrRec total=EndRec-CurrRec CS.GetTextInRegion CheckScat$, 11, 58, 11, 63 CheckScat$=Trim(CheckScat$) cScatSearch.SRCch.BINe ScatSearch.BINAScatSearch.DES+[|4SecondDelete.SRC"d? urr=1 Do While CheckScat$<>Recs.Num And curr<=total CS.GetTextInRegion CheckScat$, 11, 58, 11, 63 CheckScat$=Trim(CheckScat$) 'MsgBox CheckScat$ If CheckScat$=Recs.Num Then Exit Do CS.Send chr(1) + "H" ' Wait for response from host. CS.Receive nTimeout, chr(27) + "[?25h" curr=curr+1 Loop If curr>total Then MsgBox "End of list" Goto Done End If 'Set LockStep = Nothing MsgBox "Bad Scat! Bad!" '"Done!" Done: End Sub  QU$F4z#~)BIB/ITEM MAINTENANCE - Call Number Search(You are not viewing a call number search of [0-9] Find ScatsType the scat to find: _Num__[!0-9]Numbers only, please.H [?25h End of listBad Scat! Bad![( #V F &6FVfv"  (0CSnTimeOutCallerCheck______ScnTextplacejplace2CurrRecEndRecCurrScat_Recszaialph_totalCheckScatcurrmain5F FmK+Passportp~u2\[< 8 qO2\ 5&6FVl 5<j  qfAP2\f5g&6fFlvv\f&l5n6l vf&lh 6&flvv fFlh q:?2\i! w- j 5v j"F 5 j#L$ j$( j%H( j&5j()e**'+ ,,-. (i5&l/0112 3  f 4 755j6;7;=q0:?2\>0i0?@0Bq0:?2\C0i0E0EmGql5&62\Iq l5&62\K L.MN5jOPS5jV; )u1NumUserDialog?SessionApplication' MacroName: SecondDelete ' MacroDescription: Delete withdrawn items from the c-fly record ' Written by: Joel Hahn, Niles Public Library District sub main Dim CS as Session Set CS = CurrentSession Dim nContinue as Integer Dim nTimeOut as Integer Dim BarcodeOut as String Dim Barcode as String Dim newline as String On Error Resume Next ' The default timeout for each command is 1 minute. ' Increase this value if your host requires more time ' for each command. nTimeOut = 60 'Session.Send "5640937" + chr(13) CS.Send Chr(1) + "d" For i=1 to 10 CS.Send Chr(27)+"[B" CS.Receive nTimeout, chr(27) + "[?25h" Next i filename$="C:\DoDelete.txt" filenum%=FreeFile lenfile=FileLen(filename$) numrecs=lenfile/16 newline=Chr(13)+Chr(10) Open filename$ for Input As filenum% x=1 : bo=1 Do Until x=Lof(filenum%) Line Input #filenum%, Barcode If Barcode=" " or Barcode="" Then Goto DoNext2 CS.Send Barcode CS.Send Chr(13) CS.Receive nTimeout, chr(27) + "[?25h" '***Timing error may occur here 'CS.Receive NTimeout, chr(27) + "[?25h" bo=0 CS.GetTextInRegion CheckScreen$, 10, 11, 10, 50 'CheckScreen$=Session.ScreenText(10, 11, 1, 40) If InStr(1, CheckScreen$, "Item not found.")>0 Then 'MsgBox "No need to delete" CS.Send " " ' Wait for response from host. CS.RecGo Forward (F8) a certain number of records or itemseive nTimeout, chr(27) + "[?25h" CS.Send Chr(27)+"[A" 'CS.Receive nTimeout, Chr(27) + "[?25h" BarcodeOut=BarcodeOut+" "+newline bo=1 Goto DoNext2 ElseIf InStr(1, CheckScreen$, "Invalid barcode.")>0 Then 'MsgBox "No need to delete" CS.Send " " CS.Receive nTimeout, chr(27) + "[?25h" CS.Send Chr(27)+"[A" 'CS.Receive nTimeout, chr(27) + "[?25h" 'BarcodeOut=BarcodeOut+Barcode+newline 'bo=0 Goto DoNext2 End If CS.GetTextInRegion CheckScreen$, 9, 30, 9, 49 'CheckScreen$=Session.ScreenText(9, 30, 1, 20) If InStr(1,CheckScreen, "locked by someone") Then 'MsgBox "Someone else is using the record; please try again later." CS.Send " " Goto DoNext2 End If CS.Send chr(1) + "O" CS.Receive nTimeout, chr(27) + "[15;27H" CS.Send "1" CS.Receive nTimeout, chr(27) + "[9;30H" + chr(7) CS.Send chr(13) CS.Wait 6 CS.Send chr(13) CS.Receive nTimeout, chr(27) + "[?25h" filenum2%=FreeFile Filename2$="C:\DoDeleteout.txt" Open Filename2$ for Output as filenum2% Print #filenum2%, Barcode Close filenum2% DoNext: BarcodeOut=BarcodeOut+" "+newline bo=1 'KeyIn.Barcode=" " 'Put #filenum%, pos, KeyIn CS.Send chr(1) + "C" CS.Receive nTimeout, chr(27) + "[?25h" DoNext2: if bo=0 Then BarcodeOut=BarcodeOut+Barcode+newline bo=0 CS.Send chr(4) CS.Receive nTimeout, chr(27) + "[?25h" x=x+1 y=Seek(filenum%) If y>Lof(filenum%) then x=Lof(filenum%) Else Seek filenum%,y End If Loop close filenum% Open filename$ for Output as filenum% Print #filenum%, BarcodeOut Close filenum% MsgBox "Done!" end sub Q'$  # d [B[?25hC:\DoDelete.txt Item not found. [AInvalid barcode.locked by someoneO[15;27H1[9;30H C:\DoDeleteout.txtCDone!#V F &6FSecondDelete.BIN" SecondDelete.DES"XW,FindNote1Note2.BIN&BatchSelect.SRC \3Zjz| (08CSnTimeOut____i__filenamefilenumlenfilenumrecsnewlinexboBarcodeCheckScreen__BarcodeOut_filenum2Filename2ymain5F FmK+PassportH~u2\[ < 8ql5&62\ VjFcZj^ql5&62\ q l5&62\iVZj5$eAz8 f||l&l 6 zjC!!" zfB8#zjjOjI$567W$%q2\ &ql2\ 'q l5&62\+,q 22\G.5R&6 l0q5d2\ 2q l5&62\4ql5h&62\ 7(560(89::5m&6 lkql5h&62\ B3CEq 12\GG5&6 lIq5d2\ JKMql5&62\ Nq l5&62\Pq52\ Qq l5&6l 2\Sql    2\ Tq2\Uql2\ Vq l5&62\XeA8Y58Z"8jC[jPjWjQ\j>_(560(`dql5&62\ eq l5&62\hh(0(ijql2\ kq l5&62\m n zfEo zfBp zfBqrzjFstuzj>wz"jCxzjP(jWjQyzj>{5Ωj~ SessionApplication"  (CSnTimeOutCallerCheck______ScnTextplacejplace2CurrRecEndRecCurrScat_RecszatotalCheckYAcurr__main5F FmK+Passporth~u2\[< 8 qO2\ 5&6FVl 5<j  qfAP2\f5g&6fFlvv\f&l5n6l vf&lh 6&flvv fFlh q:?2\i! - j 5v j"F 5 j#LT j$L( j%x( j&5j)e**+ /1q(N2\2(i(346q(Delete withdrawn items from the c-fly recordN2\7(i(9&6(FVlD:5&"l6FV"lj;p<>ql5&62\@q l5&62\B CD E5ͩjGL< *u1TextUserDialog@SessionApplicationjGpHJql5&62\Lq l5&62\N OP Q5ͩjSX< *u1TextUserDialog@SessionApplication < 8ql5&62\ VjFcZj^ql5&62\ q l5&62\iVZj5$eAz8 f||l&l 6 zjC!!" zfB8#zjjOjI$567W$%q2\ &ql2\ 'q l5&62\+,q 22\G.5R&6 l0q5d2\ 2q l5&62\4ql5h&62\ 7(560(89::5m&6 lkql5h&62\ B3CEq 12\GG5&6 lIq5d2\ JKMql5&62\ Nq l5&62\Pq52\ Qq l5&6l 2\Sql2\ Tq2\Uql2\ Vq l5&62\XeA8Y58Z"8jC[jPjWjQ\j>_(560(`dql5&62\ eq l5&62\hh(0(ijql2\ kq l5&62\m n zfEo zfBp zfBqrzjFstuzj>wz"jCxzjP(jWjQyzj>{5Ωj~ SessionApplication4# 5 jFG jZrecords sub main Dim CCS As Session Set CCS=CurrentSession x=InputBox("How many to select (or unselect)?") If x="" Then Goto Done HowMany%=Val(x) If HowMany MOD 2=0 Then GoFwd%=HowMany%/2 c=0 Do CCS.Send Chr(13)+Chr(27)+"[B"+Chr(13)+Chr(1)+"E" CCS.Receive 2, "[?25h" c=c+1 Loop Until c>=GoFwd% Else GoFwd%=(HowMany%+1)/2 c=1 Do CCS.Send Chr(13)+Chr(27)+"[B"+Chr(13)+Chr(1)+"E" CCS.Receive 2, "[?25h" c=c+1 Loop Until c>=GoFwd% CCS.Send Chr(13) CCS.Receive 2, "[?25h" End If MsgBox "Done!" Done: end sub Select a range of recordsQPz$ "#&!How many to select (or unselect)?[BE [?25hDone!#P#V F 468HXhxBatchSelect.DES ] BatchSelect.BIN TItionButton6 OptionButton 84,12,60,8,"Gov't Document",.OptionButton7 OptionButton 84,24,40,8,"Pamphlet",.OptionButton8 OptionButton 84,36,36,8,"Cassette",.OptionButton9 OptionButton 84,48,20,8,"CD",.OptionButton10 OptionButton 84,60,44,8,"Video/DVD",.OptionButton11 OptionButton 84,72,36,8,"CD-ROM",.OptionButton12 OKButton 44,88,28,14 'CancelButton 76,88,28,14 End Dialog Dim WhichType As TypeChoice WhichType.Choice=1 TypeChoice=Dialog(WhichType) 'If Choice=0 Then Goto Done Select Case WhichType.Choice Case 0 DefaultPrice$="22.00" Case 1 DefaultPrice$="45.00" Case 2 DefaultPrice$="20.00" Case 3 DefaultPrice$="6.00" Case 4 DefaultPrice$="18.00" Case 5 DefaultPrice$="24.00" Case 6 DefaultPrice$="15.00" Case 7 DefaultPrice$="3.00" Case 8 DefaultPrice$="10.00" Case 9' MacroName: RecordMarc ' MacroDescription: Add "###marc" and today's date to a bib. record's 999 line ' Macro written by: Joel Hahn, Niles Public Library District Sub main 'Change the following line to what it should be for your 'library: Agency$ = "xxxmarc" dim CS as Session set CS = CurrentSession Dim nTimeOut as Integer ' The default timeout for each command is 3 minutes. ' Increase this value if your host requires more time ' for each command. nTimeOut = 180 'Set up datestamp information Today0$=Date$ Today1$=Right(Today0$, 4) Today2$=Left(Today0$, 2) Today3$=Mid(Today0$, 4, 2) Today$=Today1$+Today2$+Today3$ 'Check whether macro was triggered from within a MARC record 'or from a selected record on a Brief Titles list (and 'if so, get into the MARC record) CS.GetTextInRegion MarcTest$, 3, 9, 3, 59 '32, 3, 37 MarcTest$=Trim(MarcTest$) 'If Left(Trim(MarcTest$), 4)<>"MARC" Then If InStr(MarcTest$, "MARC ONLINE")=0 Then ' or InStr(MarcTest$, "MARC ONLINE - New")) Then If InStr(MarcTest$, "Copy List") Then Goto Done ElseIf InStr(MarcTest$, "Full Title") Then MsgBox "Please trigger macro from either brief records list or MARC Edit display." Goto Done ElseIf InStr(MarcTest$, "Brief Titles") Then RunMacro "CCS!ShiftF7" 'CS.Wait 2 CS.Receive nTimeout, "[?25h" Else Goto Done End If End If 'If the cursor is not currently in the Tag column of the 'MARC display, move it there cc=CS.CursorColumn cc19=0 Do While cc>19 cc19=1 CS.Send "\x09" CS.Receive 5, "[?25l" cc=CS.CursorColumn Loop 'Find out how many rows are in the record, and which of 'those rows the cursor is currently on CS.GetTextInRegion LinNums$, 3, 1, 3, 80 place=Instr(LinNums$, "Line") LinNums$=Right(LinNums$, Len(LinNums$)-place) place2=Instr(LinNums$, "of") CurLin=Val(Mid(LinNums$, 4, place2-4)) TotalLines=Val(Mid(LinNums$, place2+2, Len(LinNums$)-place2)) 'If the cursor is not already on the last line, send 'down arrows until it is If CurLin<>TotalLines Then Do CS.Send chr(27)+"[B" CS.Receive nTimeout, chr(27) + "[?25h" CurLin=CurLin+1 Loop Until CurLin=TotalLines End If 'Tab over to the data field, then go to the end of the line CS.Send chr(9) + chr(9) + chr(9) + chr(9) 'Old shortcut to the end of the line; only works if '910 (ATKey) is the previous line, which isn't always the 'case. Go left (up to the end of the ATKey), down (into 'the middle of "PRELIMINARY DATA", then over the few 'characters to the end of the line 'CS.Send chr(27)+"[D"+chr(27)+"[B" 'CS.Send chr(27)+"[C"+chr(27)+"[C"+chr(27)+"[C"+chr(27)+"[C" For i=1 to 16 CS.Send chr(27)+"[C" Next i CS.Receive nTimeout, chr(27) + "[?25h" 'Last check-- by this point, the cursor should be at the 'end of the 999 line; if not, then there isn't a 999 line 'in the record and one must be added before proceeding CursRow=CS.CursorRow CS.GetTextInRegion PrelimDat$, CursRow, 27, CursRow, 42 If PrelimDat$<>"PRELIMINARY DATA" Then CS.GetTextInRegion InsOvr$, 21, 70, 21, 75 If InsOvr$="OVERST" Then CS.Send "\x1B[K" CS.Receive nTimeout, chr(27) + "[?25h" End If CS.Send chr(27)+"[A"+Chr(9)+Chr(13)+"999 aPRELIMINARY DATA" End If 'Add the intent to interface, with today's datestamp CS.Send " "+Agency$+" "+Today$ CS.Receive nTimeout, chr(27) + "[?25h" 'Store the changes to the record CS.Send chr(1) + "J" '[F10] CS.Receive nTimeout, chr(27) + "[?25h" 'The macro stops here to allow the user to back out of the 'store function, just in case the macro doesn't work 'properly, or if the user had selected the wrong record 'To fully automate the function, so that it's possible to 'include the intent to interface from a selected Brief 'Title record and then automatically return to the Brief 'Title list, remove the comment mark from the following 'lines: 'CS.Send " " 'CS.Send chr(1) + "C" '[F3] Done: End Sub b DefaultPrice$="17.00" Case 10 DefaultPrice$="38.00" Case 11 DefaultPrice$="20.00" End Select 'RecNums$=Session.ScreenText(2,50,1,29) 'place=Instr(RecNums$, "Records") 'RecNums$=Right(RecNums$, Len(RecNums$)-place) 'place2=Instr(RecNums$, "of") 'CurrRec=Val(Mid(RecNums$, 7, place2-7)) 'TotalRecs=Val(Mid(RecNums$, place2+2, Len(RecNums$)-place2)) ' 'HM$=" Enter the total number of records to change, starting with " 'HM$=HM$+"the current record."'+Chr(10)+" Use 'A' to change all " ''HM$=HM$+"records from the current record to the end of the list." 'ThirdChoice: 'Begin Dialog ChangeRecs ,,126,57,"How Many?" ' TextBox 4,40,20,12,.HowMany ' Text 4,4,120,32,HM$ ' OKButton 28,40,32,12 ' CancelButton 64,40,32,12 'End Dialog 'Dim HowMany as ChangeRecs 'HowMany.HowMany=CStr(TotalRecs-CurrRec+1) 'HMy=Dialog(HowMany) 'If HMy=0 Then Goto Done 'HMany$=HowMany.HowMany ''If InStr(1, HMany$, "A", 1)=0 Then ' If HMany$="0" Then ' Goto Done ' Else ' howm=Val(HMany$) ' If howm=0 Then ' MsgBox "Data must be a number" ' or 'A'" ' Goto ThirdChoice ' 'ElseIf TotalRecs ebYes then End ' end if ' Sleep(500) ' end if ' ' z=z+1 ' Loop Until z=(TotalRecs-CurrRec+2) ' ' MsgBox "Done!" Done: end sub