I have run the apple script the below error will stop the script intially itself. Can anyone helpme out what is the exact issue.
Thanks Manan! Its may be a OS issue?
Yes, it most probably is an OS issue. Which is the version of your Mac OS? Looking at the hits I got on google, it seems we need to provide security access to the event originating and receiving applications to resolve this issue.
I have done the script in Mac OS Catalina and the script is run in the some other OS it cause the above error.
Not, in my opinion, AppleScript is just code, which gets interpreted on the machine that it executes, afaik. So this should not be the reason, though I admit my limited knowledge of AppleScript. Someone more experienced might pitch in with better insights
This happens cause of Apples SIP (secure integrity protection) beginning with macOS catalina.
Before going in depth the three most important questions are:
Do you need applescript to perform the task? Can you show us the tell system events part?
Do you use the process on your own or do you need to publish it?
Yes! Apple Script is performing the task.
Looks like you are running the script as part of an OSX Automator action? Does the script work if you copy it to one of InDesign’s scripts folders and run it from the Scripts panel?