Search code examples
xcodecheckboxapplescriptapplescript-objc

How to get the value of a check box in ApplescriptObjC


I'm trying to get the value of a check box in ApplescriptObjC.

    on goClicked_(sender)

        set checkBoxValue to checkBox's stringValue as boolean

    end goClicked_

This code doesn't work. Any ideas?


Solution

  • If checkBox is set as an outlet, then you can get its state [0/1] with:

    set checkBoxValue to (checkBox's state())