Page 1 of 1

Using Apple Script Cool Term with xojo

PostPosted: Sat Jul 03, 2021 6:57 pm
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

Re: Using Apple Script Cool Term with xojo

PostPosted: Sat Jul 24, 2021 1:52 pm
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.