--Script for Components (AU) "flat" UAD Folder Structure. Use at your own discretion. -- The "Move to Trash" value is set to false by default. Set to "true" if you want the script to move tagged items to trash for you. set trashFile to false set colorList to {"1-Orange", "2-Red", "3-Yellow", "4-Blue", "5-Purple", "6-Green", "7-Grey", "0-Unset"} tell application "Finder" set inputDialog to "Choose *INPUT FILE* for the files want TAGGED." set defaultColor to "6-Green" set ext to ".component" if trashFile then set trashResult to display dialog "MOVE TO TRASH is enabled. Click OK to proceed." if trashResult is false then return else set inputDialog to "Choose *INPUT FILE* for the files want TRASHED." set defaultColor to "2-Red" end if end if try set import_file to choose file with prompt inputDialog default location (path to documents folder) set defaultComponents to alias "Macintosh HD:Library:Audio:Plug-Ins:Components" set pluginFolder to choose folder with prompt "Select your Components Folder showing plugins." default location defaultComponents --set ComponentsFolders (name of every item of folder pluginFolder) : for future "repeat nest" should Component folders be used. set plugin_list to (import_file as string) as alias set allPlugins to paragraphs of (read plugin_list) set tempChoice to choose from list colorList with prompt "Choose Tag Color:" default items defaultColor if tempChoice is false then return else set colorChoice to character 1 of (tempChoice as string) as integer end if repeat with thisPlugin in allPlugins set tempFile to ((pluginFolder as string) & thisPlugin & ext) if exists file tempFile then set thisFile to tempFile as alias set label index of thisFile to colorChoice if trashFile then move thisFile to trash end if end if end repeat display alert "Done. Please do something nice for someone today." on error err1 number n1 display dialog err1 & return & "Error No: " & n1 end try end tell