在 Xcode AppleScript 应用程序中获取单选按钮标题

Get RadioButton Title in Xcode AppleScript App

我想获取 RadioButton 的标题,我将一个名为 ChooseType_ 的事件连接到三个 RadioButton,我想在输出中打印所选 RadioButton 的标题

on ChooseType_(sender)
    set TitleOfRadio to title of sender as string
    print TitleOfRadio
    #Or
    set TitleOfRadio to sender's Title as string
    print TitleOfRadio
end ChooseType_

我写的两个选项都不行

就 AppleScriptObjC 而言,属性 是一个函数,因此您必须添加括号

on chooseType_(sender)
    set titleOfRadio to sender's title() as text
    log titleOfRadio
end chooseType_