Folder action script not working
I have the following script as folder action. However, it stopped working after an upgrade of the OS. Can anyone see what is wrong?
It is a disk image that is being loaded and once loaded it should open a FMP file that I like to be opened once the disk image is loaded.
on adding folder items to this_folder after receiving added_items
tell application "Finder"
repeat with tItem in added_items
set tName to the name of tItem --get the name of each added_items
if tName = "DiskimageName" and class of (item tItem) is disk then
tell application "VeraCrypt"
quit
delay 1
end tell
activate
open document file "FilemakerDatabase.fmp12" of tItem
exit repeat
end if
end repeat
end tell
end adding folder items to
I have selected Volumes and Desktop and my OS disk (see pic) to run the script but that does not make a difference.
Any idea?