Good old Pashua will not survive when Apple ditches Rosetta in next OS. So I am rewriting all dialogue boxes. When scripting InDesign and putting my scripts in the Script Panel I have this:
a) If saved as an App I am allowed to paste text into the text field of the script
b) If saved as a script I am NOT allowed to paste into the text field.
Using the “Simple Sample” script from the Dialog Toolkit as example (as below)
I have seen some beachballing on Tahoe when saving as an app, so I was planning to save as script.
Is there a trick for this? Is it ACC? (Or should I use InDesigns dialogs instead?)
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
use script "Dialog Toolkit Plus" version "1.1.0"
set theMessage to "How many buttons would you like? There's no real limit except for practical and aesthetic considerations." & return & "Of course, I hope you'll never really think about using something as ugly as this!" & return & return & "Choose your heart out!"
set {theField, theTop} to create field "" placeholder text "Enter your text here" left inset 0 bottom 0 field width 650 extra height 60 with accepts linebreak and tab
set {buttonName, suppressedState, controlsResults} to display enhanced alert "Many Buttons" message theMessage as informational alert buttons {"OK", "Five", "Four", "Three", "Two", "One", "Cancel"} giving up after 0 acc view width 650 acc view height theTop acc view controls {theField} without suppression
Running your script as is from the fast script menu, I am allowed to paste into the field. In what context are you running it where you can’t do that?
There have been some contexts I’ve used where a call from a script menu command calls a separate stand-alone, stay open app set up for that purpose, kind of the best of both worlds.
I‘m currently working on a potential rewrite of Pashua by trying to support every feature it currently has, plus additional features. like Markdown Text, JXA Support (pure JXA not like the current AS-JXA Binding) and others…
Support is planned for macOS 10.13 High Sierra and later.
Also, I need to get in touch with its current Developer, wo is in search of a new developer for Pashua, because he wants to retire on this project.
Please give me time … it might be not working like I want to. I don’t know, if it will be accepted by Apple like it’s currently planned though, but I hope so.
I’ll Post an official update when everything works out as intended.
Well to be honest with you… I have decided to give this a try, because I have many little tools (written by a friend of mine for me) that are using Pashua and I love how versatile it is already. But also be patient… it might take a while - or it maybe just doesn’t work out.
I’ll even have to consider of searching for contributors to take this with me - since I (at least for maybe minimum next two years) will only actively can workout the Intel side of this. We‘ll see…
It might also be possible that I could even will not get my chance on this whole thing… it truly might also depend upon Carsten‘s (the Developer) acceptance…
I also have to say that this would be my very first attempt on a project that will be used by many many people for many years to come.
Of course I’ll try my best to give this a true reality. Because I love this tool … I mean it’s codebase hasn’t changed much in 20 years… and it still runs flawlessly on Apple‘s newest OS‘ses (from what I’ve heard). This is a thing that should be kept alive.
But again … patience… I‘ve just begun to write a test version just for me - and there’s also a chance that it might even be an impossible task for me to do.
You’re right about mentioning swiftDialog. But there are two major downsides. At first is supports max 3 Buttons. The second thing it supports way less Scripting Languages than Pashua.
Yes, Pashua maybe has a wonky downside by stealing the focus on the frontmost App while its showing up a dialog. But only in its current official Version. But - it is way more capable in these two things I mentioned than swiftDialog will ever be.
Besides that swiftDialog is a tool, intended for handling Scripted installations and everything else that’s about Device Management.
Pashua on the other side is a solution to give most scripting Languages a native Interface like we all know because it’s coming with the OS and an ability for users to integrate it with ease.
On my ToDo list are features that are currently not in Pashua, like Icons with offset, an integration that ensures the Dialog is never stealing the frontmost App‘s Focus, and some others.
About the rest - I’ll don’t repeat myself here. It’s said above in my last reply. So please bare with me.