Dialog Toolkit+ is incredible, and I congratulate the developer who created it.
But I have a small problem:
I just created my application with the Dialog Toolkit+ interface, which works very well when I launch it from the script debugger application.
Then I save it as an application with an On open-end Open entry so that the application takes files as input before sending the interface created with Dialog Toolkit+.
It works very well, but only the first time I launch it, and it asks me for various permissions. Normal. And everything else works perfectly.
However, the following times the application opens and closes immediately. Why?
Do I need to register this application in a certain way?
Do I need to include certain permissions?
Did I forget something?
In fact, I created an interface that, once validated, launches a script for various actions.
Everything works fine when I run it from SD. It still works fine with an on open command to drag and drop input files.
But it no longer works at all when I add the handlers after the program.
Is there a problem with the handlers in Dialog Toolkit+?
I think we’d have to see an example to verify this is an issue with DialogToolkit+
Can you winnow down your script to the bare minimum that triggers this error and post it?
(I use Dialog Toolkit all the time and have had no issues with it)
Thanks! I must have missed something obvious…
So, in fact, the problem doesn’t seem to be with my interface because it works fine as long as I run it as a script from SD.
I have the same problem regardless of the interface.
To keep it simple, I used the “simple sample” file provided with Dialog Toolkit+, and when I add the handlers (currently inactive) I need to my program and save it as an application, nothing works.
The application crashes 9 times out of 10.
So the problem isn’t with my interface, but with saving it as an application.
How do you save your interface?
Is saving it as an (Apple) application enough?
You can post your appleScript code directly by inserting
```appleScript
in one line before your code and
```
in a line after your code.
So you can paste directly from your script debugger script window into a post and add those lines above and below your code.
Looking at your screen image I see no issues with the Dialog Toolkit text, so I’m wondering if there’s not something your handlers.
When I’ve had apps quit immediately on launch I think there’s been something in the mac’s security/privacy settings or the accessibility settings.
I suggest running your app, then as soon as it quits open settings and scroll through security/privacy and accessibility and see if there’s not a issue related to your app.
Also, I’ve never had an issue with saving a script using Dialog Toolkit Plus in an application. Works every time, even with complex scripts and interfaces. Here’s a link to an example I posted on MacScripter a few weeks ago.
Good evening Ed.
Thanks for helping me.
So I went into the Mac’s security settings to authorize the application. It still didn’t work, but I finally delved into the SD card settings and found what was wrong:
I had to fill in the export options boxes!
And then I had to export the application for it to work.
And there you have it!
I’m an AppleScript amateur, and I’d never done this before because my AppleScript applications worked fine until then without making these kinds of settings or exporting.
It’s very silly, but there you go
I’ve successfully created my first real Applescript app!
Interesting… When you export you’re code signing the app, and creating a read only copy of your app. (Be sure you don’t delete the original version because there is no way to open and edit a read-only version in Script Debugger, Script Editor or any other app).
I think there is something missing from the scenario here, because I have never had to export a app to make it run (I only do that if I’m going to distribute the app).