I cobbled together a simple script that runs a shell script on folders with the .iconset name ending, and I’m wanting the script to display a dialog message if the item dropped on to the script saved as an application doesn’t meet the requirements.
Here’s the script
on open these_items
tell application "Finder"
set theSelection to selection
set theFolder to (item 1 of theSelection) as text
end tell
do shell script "iconutil -c icns" & space & quoted form of POSIX path of theFolder
end open
Ideally it would check if the type of item droppped on to it is a folder, and also that the name ending is .iconset (e.g. “folder name.iconset”), but maybe it would be enough to check just the name ending?
Any help would be appreciated