Are Checkboxes available in Applescript (Newbie to Applescript)

Hi!

I have made a script to interact with Entourage, but i need checkbox facility…
are these possible in AS?

Thanks in advance!
Jamie

Hi Jamie,

no, there is no check box in AppleScript.

You have to
either: write your AppleScript application in xCode - then you have access to all GUI elements (Interface Builder)
or: search for a scripting addition
or: use a workaround - maybe sth like this:


global myOptions, mySelectedOptions
set myOptions to {"option 1", "option 2", "option 3", "option 4"}
set mySelectedOptions to {}

repeat while (true) -- just a loop to try the options menu ...
	setOptions()
	display dialog "procede ?" giving up after 5
	if button returned of result ≠ "OK" then exit repeat
end repeat


on setOptions()
	set optionsTemp to (choose from list myOptions default items mySelectedOptions OK button name "Set" with multiple selections allowed)
	if (optionsTemp ≠ false) then set mySelectedOptions to optionsTemp
end setOptions

Cheers Dominik!

The 24U Software Appearance OSAX is a good scripting addition that adds extra elements to a dialog interface like check boxes, pop-up menus, more buttons, etc. I find that it allows me to accomplish more without having to write a full program in Xcode.

WF

Jamie

There is the Switch Button (NSSwitchButton). I believe this is the Cocoa implementation of the Check Box.

Paul