Applescript repeatedly asks to allow
I have the AppleScript below which when it is opened on the desktop runs fine.
However, when it is saved as an app to my scripts folder it always comes up with this if the encrypted .dmg is not mounted. If the .dmg is mounted it runs fine.
It may come up with this warning a few times in a row but eventually the script works.
try
do shell script " hdiutil attach /Users/mbair/Documents/STUFF/VARIED.dmg"
end try
tell application "Finder"
delay 2
if not (exists disk "VARIED") then return
end tell
tell application "Adobe Acrobat" to activate
tell application "Adobe Acrobat"
open file "VARIED:FIXED.pdf"
end tell
I have struggled with this in both Tahoe and Golden Gate. This is in Golden Gate.
I assume this is a privacy and security issue but don't know how to stop this.
Thanks