Collection division macros

(Redirected from Central library macros)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The following is a list of macros used in the Collection division. All macros except the Connexion macros were created with MacroExpress.

Connexion

OCLC Connexion comes with about 15 macros pre-loaded for catalogers to use when creating and editing records. Some examples are:

  • Add33x generates a set of 336, 337, and 338 fields (content, media, and carrier types) based on cataloger input, and is useful when creating or updating records to RDA.
  • GenerateAuthorityRecord creates a bare-bones authority record from a 1xx or 7xx field, and streamlines the entry of common authority information such as associated place and language.
  • GenerateERecord derives an e-resource record from the record currently being worked on (for example, if a cataloger discovers that the book they are working with has been digitized by the Hathi Trust, but a record has not yet been created in OCLC for the digitized version)


In the Connexion client interface, macros can be accessed at Tools > Macros > Manage (or Ctrl+Alt+Shift+G). Connexion macros can be edited, adapted, or created from scratch with the Edit or New Macro commands; more information can be found in the Macros section of OCLC's Connexion client documentation.

Many librarians and libraries have made collections of their own OCLC macros available: Joel Hahn has a number of useful macro resources, as does Walter Nickeson.

IrfanView

ctrl+alt+shift+2

When the left page of a two-page-spread is highlighted, saves each page separately and navigates to the next two-page-spread. (To be used with the ctrl+alt+shift+c macro.)
Text Type: <ALT>en
Text Type: s
Text Type: <RIGHT ARROW>a<ENTER>
Text Type: <CTRL>z
Text Type: <CTRL>x
Text Type: s
Text Type: <RIGHT ARROW>b<ENTER>
Text Type: <SPACE>

ctrl+alt+shift+c

Crops the blank space from all of the chopped-in-half images in a directory, and exits IrfanView when finished. (To be used with the ctrl+alt+shift+2 macro.)
Macro Playback Speed: 2 Times Slower than Normal
Variable Set String %T2% "true"
Repeat Until %T2% = "false"
   Text Type: <CTRL>Y
   Delay 100 Milliseconds
   Text Type: <CTRL>s
   Delay 100 Milliseconds
   Text Type: <ENTER>
   Delay 100 Milliseconds
   Text Type: <LEFT ARROW>
   Delay 100 Milliseconds
   Text Type: <ENTER>
   Delay 500 Milliseconds
   Text Type: <SPACE>
   Wait For Window Title: ".jpg"
   Variable Set String %T1% from Window Title
   Variable Set Integer %N1% from Position of Text in Variable %T1% //Search Text: .
   Variable Set Integer %N2% from Length of Variable %T1%
   Variable Modify Integer: %N2% = %N2% - %N1%
   Variable Modify Integer: Inc (%N1%)
   Variable Modify String: Delete Part of %T1% //Starting Position: N1, Characters to Delete: N2
   If Variable %T1% does not contain "a."
      AND
   If Variable %T1% does not contain "b."
      Variable Set String %T2% "false"
   End If
Repeat End
Text Type: <ALT>fx
Macro Stop

ctrl+shift+r

Batch renames thumbnails from the "images jpg" folder into the "images" folder (created with the ctrl+shift+i macro), then exits IrfanView.
Macro Playback Speed: 2 Times Slower than Normal
Text Type: <CTRL>a
Delay 250 Milliseconds
Text Type: b
Delay 250 Milliseconds
Text Type: <ALT>l
Delay 250 Milliseconds
Text Type: <ALT>w
Delay 250 Milliseconds
Text Type: <UP ARROW>
Delay 250 Milliseconds
Text Type: <ENTER>
Delay 250 Milliseconds
Text Type: <ALT>s
Wait For Window Title: "Batch conversion done"
Text Type: <ALT><F4>
Text Type: <ALT><F4>
Text Type: <ALT><F4>

Other

ctrl+shift+i

Within a BookReader folder within the "bookreaders to upload" folder, adds three empty folders, one called "images", one called "images jp2k", and one called "images jpg", and a book.properties file.
Macro Playback Speed: 2.5 Times Slower than Normal
Variable Set String %T1% from Window Title
Text Type: <ALT>fwf
Delay 0.5 Seconds
Text Type: images
Text Type: <ENTER>
Text Type: <ALT>fwf
Delay 0.5 Seconds
Text Type: images jp2k
Text Type: <ENTER>
Text Type: <ALT>fwf
Delay 0.5 Seconds
Text Type: images jpg
Text Type: <ENTER>
Delay 0.5 Seconds
Launch and Activate: "notepad.exe" // Window Title: Notepad; Program Path/Name: C:\WINDOWS\system32\notepad.exe
Text Type: BookIdentifier = %T1%
Text Type: <ENTER>
Text Type: Thumbnail Image = 0001
Text Type: <ENTER>
Text Type: TotalPages = 
Text Type: <ALT>fa
Text Type: C:\Users\ewahl.FOLGER2000\Desktop\bookreaders to upload\
Text Type: %T1%\book.properties
Text Type: <ENTER>
Text Type: <ALT>fx

ctrl+shift+e

With Outlook open, sends an email to [Person 1] and [Person 2] alerting them of a bookreader upload.
Text Type: <CTRL>n
Text Type: Person 1<TAB>
Text Type: Person 2<TAB>
Text Type: <TAB><TAB>
Text Type: insight upload today (bookreaders) (nfm)
Text Type: <CTRL><ENTER>

ctrl+shift+f

After copying a link from Luna, pastes a properly formatted link into the finding aid.
Text Type: <ENTER>
Text Type: <altformavail>
Text Type: <ENTER>
Text Type: <head>Digital image(s)
Delay 1 seconds
Text Type: <ARROW RIGHT><ARROW RIGHT><ARROW RIGHT><ARROW RIGHT><ARROW RIGHT><ARROW RIGHT><ARROW RIGHT>
Text Type: <ENTER>
Text Type: <p>
Text Type: <extref ns2:actuate="onLoad" ns2:show="new" ns2:title="Digital image(s)"<SPACE>
Text Type: ns2:href="
Clipboard Paste
Text Type: ">
Clipboard Paste

ctrl+shift+a

When a Bard Classic-style link (text: link) is highlighted, changes it to a Bard2/Folgerpedia-style link ([link text]).
Clipboard Copy
Variable Set String %T1% from Clipboard
Variable Set String T2% "%T1%"
Variable Set Integer %N1% from Length of Variable %T1%
Variable Set Integer %N2% from Position of Text in Variable %T1% //Search Text: :
Variable Modify Integer: %N3% = %N1% - %N2%
Variable Modify Integer: Inc (%N3%)
Variable Modify String: Delete Part of %T1% //Starting Position: N2, Characters to Delete: N3
Variable Modify String: Delete Part of %T2% //Starting Position: 1, Characters to Delete: N2
Variable Modify String: Left Trim %T2%
Text Type: [%T2% %T1%]

alt+shift+s

When the text is highlighed, will flip text from [string a], [string b] to [string b], [string a].
Clipboard Copy
Variable Set String %T1% from Clipboard
Variable Set String T2% "%T1%"
Variable Set Integer %N1% from Length of Variable %T1%
Variable Set Integer %N2% from Position of Text in Variable %T1% //Search Text: ,
Variable Modify Integer: %N3% = %N1% - %N2%
Variable Modify Integer: Inc (%N3%)
Variable Modify String: Delete Part of %T1% //Starting Position: N2, Characters to Delete: N3
Variable Modify String: Delete Part of %T2% //Starting Position: 1, Characters to Delete: N2
Variable Modify String: Left Trim %T2%
Text Type: %T2%, %T1%

ctrl+alt+t

When text is highlighted, a text box will display with the ASCII values of the characters in the highlighted text.
Clipboard Copy
Variable Set String %T1% from Clipboard
Variable Set Integer %N1% from Length of Variable %T1%
Variable Set String %T2% ""
Repeat Start (Repeat %N1% times)
   Variable Set %N2% to ASCII Value of %T1%
   If Variable %N3% = 1
      Variable Modify String: Append "%N2%" to %T2%
   Else
      Variable Modify String: Append ", %N2%" to %T2%
   End If
   Variable Modify String: Delete Part of %T1% //Starting Position: 1, Characters to Delete: 1
Repeat End
Text Box Display: //Box Content: %T2%

ctrl+shift+L

For BBI project: in Access, to be used when "leaf" is left off before the signature. This macro will add "leaf" to the beginning of the page-level metadata field in the highlighted cell, and then navigate to the cell below.
Clipboard Copy
Text Type: leaf<SPACE>
Clipboard Paste
Text Type: <ARROW DOWN>