Hi all,
A frequent contributor to this site, Shane Stanley, developed an awesome script library, called Dialog Toolkit, that I’ve discovered recently and have been using to build out a custom dialog for an applet I’ve created. However, I’m trying to figure out how to put the result of a checkbox that I’ve created through this library back into my script to act on it. The snippet of code is below; any help would be greatly appreciated. The checkbox returns true or false values, which is perfect, but I need to find out which values specifically the checkbox is returning. I also would like to designate default and cancel buttons, which gives me an error every time I try to do so.
Thanks so much,
Rocco
use scripting additions
use script "Dialog Toolkit Plus" version "1.0"
set theMessage to "FloTools has detected that your current operating system is Mac OS Mojave. Due to Mojave's new security measures, you will be presented with multiple permission dialogs from this installer after proceeding. You must click OK in all of the dialogs that appear in order for FloTools to be properly installed." & return & "If the installer becomes busy or unresponsive for a long period of time, there may be a hiding system dialog that needs confirmation before continuing."
set {theCheckbox, theTop, newWidth} to create checkbox "I have read and understand the information in this dialog." bottom 0 max width 400 without initial state
repeat until result is true
set {buttonName, suppressedState, controlsResults} to display enhanced alert "Security Alert:" message theMessage as informational alert buttons {"Cancel", "Next"} acc view width 650 acc view height theTop acc view controls {theCheckbox} without suppression
end repeat