Я пытался извлечь ключевые слова из раздела "Дополнительная информация" в поиске. Мне удалось извлечь данные из раздела «Общие», но я не смог найти способ извлечь их из раздела «Дополнительная информация». Ниже приведен код, который у меня есть для раздела «Общие»
- КОД ВЕРСИЯ 1 -
on run
tell application "Finder"
set selectedItem to (item 1 of (get selection))
set infoList to {}
copy ("Displayed Name: " & displayed name of selectedItem) to end of infoList
copy ("Kind: " & kind of selectedItem) to end of infoList
copy ("Size: " & size of selectedItem & " (" & physical size of selectedItem & ")") to end of infoList
copy ("Where: " & (selectedItem as alias) as string) to end of infoList
copy ("Created: " & creation date of selectedItem) to end of infoList
copy ("Modified: " & modification date of selectedItem) to end of infoList
copy ("Name & Extension: " & name of selectedItem) to end of infoList
copy ("Locked: " & locked of selectedItem) to end of infoList
copy ("Comments: " & comment of selectedItem) to end of infoList
copy ("Owner: " & owner of selectedItem) to end of infoList
copy ("Group: " & group of selectedItem) to end of infoList
end tell
set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
set infoAsString to infoList as string
set AppleScript's text item delimiters to od
set the clipboard to infoAsString
return infoAsString
end run
- КОД ВЕРСИЯ 2 -
tell application "Image Events"
-- start the Image Events application
launch
-- open the image file
set this_image to open (inputPath & "HighRes/" & fname & ".tif")
-- extract the value for the metadata tag
tell this_image
set the imgDescp to the value of metadata tag "description"
end tell
-- purge the open image data
close this_image
end tell