--changes Baskerville true type numbers to OSF
tell application "Adobe InDesign CC 2018"
activate
set myFont to item 1 of (every font whose name is "Baskerville Regular")
my TextSearch(24, 1700, myFont)
my TextSearch(25, 1701, myFont)
my TextSearch(26, 1702, myFont)
my TextSearch(27, 1703, myFont)
my TextSearch(28, 1704, myFont)
my TextSearch(29, 1705, myFont)
my TextSearch(30, 1706, myFont)
my TextSearch(31, 1707, myFont)
my TextSearch(32, 1708, myFont)
my TextSearch(33, 1709, myFont)
end tell
on TextSearch(f, c, myFont)
tell application "Adobe InDesign CC 2018"
set find glyph preferences to nothing
set change glyph preferences to nothing
set applied font of find glyph preferences to myFont
set glyph ID of find glyph preferences to f
set applied font of change glyph preferences to myFont
set glyph ID of change glyph preferences to c
tell active document
change glyph
end tell
end tell
end TextSearch