|
|
Update AppleScript to dump nested folder information to run on Catalina
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2008
Location: Kumamoto, Japan
Status:
Offline
|
|
I have an applescript that worked under old MacOS, but has an apparently simple issue under Catalina.
It collects a variety of information from the selected folder, including filename, path, byte count, file type and creator, and just outputs it to a text file.
The actual processing code worked fine and probably does not need revision, but when I try to run it under Catalina (10.15.4), an error message says that it is not allowed to send AppleEvents to Finder (-1743).
I suspect this is a fairly simple problem, but unfortunately I know almost nothing about AppleScript.
Can anyone give me a hand getting it to work again?
Or suggest a better place to ask?
Thanks.
Edward Lipsett
Kumamoto, Japan
|
|
|
|
|
|
|
|
|
Administrator
Join Date: Jun 2000
Location: California
Status:
Offline
|
|
macOS has generally added more and more internal security permissions. Your script needs permission to control the Finder. These types of controls are under:
Sys Prefs -> Security & Privacy -> Privacy (tab)
In the left-side pane, try the "Automation" category. See if your script is listed, with a checkbox to control Finder. The "Full Disk Access" might be another category to check.
You might have to check in these places right after running your script.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2008
Location: Kumamoto, Japan
Status:
Offline
|
|
No, it's not listed under automation.
There isn't any obvious way to add anything to the list of authorized apps, though...
It is listed under full disc access, and I added it there since it's an app now.
I haven't restarted the machine yet, but with the app listed in full disc access, and the checkbox checked, the same error message displays.
I'll try restarting the Mac later and see if that changes anything.
Edit 20 April: No, didn't change anything. The same error message is still generated.
(
Last edited by elipsett; Apr 19, 2020 at 10:07 PM.
)
|
=====
Edward Lipsett
Kumamoto, Japan
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Mar 2004
Location: UK
Status:
Offline
|
|
|
I have plenty of more important things to do, if only I could bring myself to do them....
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2008
Location: Kumamoto, Japan
Status:
Offline
|
|
Yup, that fixed it! Thanks!
Specifically,
"A workaround is to re-export the Application from the .scpt or .applescript source code. This generates a new .app application, which in my case ran successfully. The initial launch required approval (as well as some subsequent launches), and the application was added as an entry under Settings -> Security & Privacy -> Privacy -> Automation."
|
=====
Edward Lipsett
Kumamoto, Japan
|
|
|
|
|
|
|
|
Banned
Join Date: May 2020
Status:
Offline
|
|
Your script needs permission to control the Finder.
|
|
|
|
|
|
|
|
|
Administrator
Join Date: Jun 2000
Location: California
Status:
Offline
|
|
When you return next week to edit a spam link into your post, we will be waiting for you.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|