Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Update AppleScript to dump nested folder information to run on Catalina

Update AppleScript to dump nested folder information to run on Catalina
Thread Tools
elipsett
Fresh-Faced Recruit
Join Date: Sep 2008
Location: Kumamoto, Japan
Status: Offline
Reply With Quote
Apr 17, 2020, 11:32 PM
 
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
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
Apr 17, 2020, 11:52 PM
 
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.
     
elipsett  (op)
Fresh-Faced Recruit
Join Date: Sep 2008
Location: Kumamoto, Japan
Status: Offline
Reply With Quote
Apr 18, 2020, 12:57 AM
 
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
     
Waragainstsleep
Posting Junkie
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Apr 26, 2020, 07:33 PM
 
I have plenty of more important things to do, if only I could bring myself to do them....
     
elipsett  (op)
Fresh-Faced Recruit
Join Date: Sep 2008
Location: Kumamoto, Japan
Status: Offline
Reply With Quote
Apr 26, 2020, 08:22 PM
 
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
     
ianatkinson
Banned
Join Date: May 2020
Status: Offline
Reply With Quote
May 14, 2020, 12:39 AM
 
Your script needs permission to control the Finder.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
May 14, 2020, 01:16 AM
 
When you return next week to edit a spam link into your post, we will be waiting for you.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:20 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,