set inputFolder to (choose folder with prompt "Select folder" without invisibles)
tell application "Finder"
set theFonts to (get files of entire contents of inputFolder whose kind contains "font")
-- move theFonts to (path to fonts from user domain) -- moves found files to ~/Library/Fonts
end tell
tell application "Finder"
set temp to folder "Fonts"
my getItemNames(temp)
tell application "Font Book"
quit
end tell
end tell
on getItemNames(aFolder)
tell application "Finder"
set theFolderItems to (get items of aFolder)
end tell
repeat with anItem in theFolderItems
tell application "Finder"
if kind of anItem is not "folder" then
set continueProc to false
if (kind of anItem as string) contains "font" then
open anItem
delay 3
tell application "System Events" to tell process "Font Book"
click button "Install Font" of group 1 of window 1
end tell
end if
else
set continueProc to true
end if
end tell
if continueProc is true then
getItemNames(anItem)
end if
end repeat
end getItemNames