Using Apple Script Cool Term with xojo

If you have specific questions or problems with any of my Open Source Projects, post them here.
Post Reply
ldalep
Posts: 1
Joined: Wed Mar 17, 2021 5:15 am

Using Apple Script Cool Term with xojo

Post by ldalep »

Hi Roger

I decided to learn more about apple scripts so I used your example "is application running". The script runs fine with the script editor and spits out an error of -1743 Not autorized to send Apple events to CoolTerm when I change the script to an app. Also if I take the compiled script file into xojo project and say execute the script from a button it launches the app but does not send out any dialog. I have the the handler wrapped with on run {} . Any ideas

A little bit more info. Turns out that the newer OS (I have catalina) needs a NSAppleEventsUsageDescription key in the info.plist. Also I found that the apps didn't run because I opened the latest rev 1.9 then I renamed it to CoolTerm_1_9. I still have a problem in the xojo debugger even when info.plist is added to the project. It continues to ask for control of the CoolTerm.app

Test.debug.app“ wants access to control “CoolTerm.app“. Allowing control will provide access to documents and data in “CoolTerm.app“, and to perform actions within that app.

Although going through the dialog and saying OK you have to do this each time you run the program from the debugger
User avatar
roger
Site Admin
Posts: 485
Joined: Fri Apr 24, 2009 12:41 am
Contact:

Re: Using Apple Script Cool Term with xojo

Post by roger »

ldalep wrote:Although going through the dialog and saying OK you have to do this each time you run the program from the debugger
I think that each time you run the app from the debugger, macOS may think it's a new build and thus requires approval each time. When you compile the app in to an executable and run that, it should only ask you the first time, and after that it shouldn't ask you anymore.
Post Reply