Hi.
I have an AppleScript Studio app with a table. When a person drops an item onto the table, the file’s path appears in the Files column. I have a script ready that can parse the app’s Info.plist and returns the path of the icon. Here is the script:
on getIcon(apath)
set iconpath to 0
set sourceplist to apath & "/Contents/Info.plist"
tell application "System Events"
if property list item "CFBundleIconFile" of contents of property list file sourceplist exists then
set iconpath to (value of property list item "CFBundleIconFile" of contents of property list file sourceplist)
if iconpath does not contain ".icns" or ".png" or ".tiff" or ".jpg" or ".jpeg" or ".bmp" or ".gif" or ".psd" or ".pict" or ".jp2" then
set iconpath to iconpath & ".icns"
end if
set iconpath to apath & "/Contents/Resources/" & iconpath
end if
end tell
return iconpath
end getIcon
This code works fine. Now I have an Icons column in my table with an image cell in it, and I want to set the image of the image cell to the image whose path is returned by the getIcon script. Is that possible?
Thanks