【发布时间】:2018-12-29 23:29:19
【问题描述】:
我想知道如何使用 AppleScript 隐藏/显示标签我尝试过类似的方法:
property label : missing value
if label's isHidden() = 1
label's setHidden_(0)
end if
但没有工作。
【问题讨论】:
标签: xcode applescript applescript-objc
我想知道如何使用 AppleScript 隐藏/显示标签我尝试过类似的方法:
property label : missing value
if label's isHidden() = 1
label's setHidden_(0)
end if
但没有工作。
【问题讨论】:
标签: xcode applescript applescript-objc
要执行 AppleScript if 表达式,您必须将 ObjC BOOL 强制转换为 AppleScript boolean。
但是您可以在 setter 中传递 AppleScript boolean。
if label's isHidden() as boolean then -- is true is redundant
label's setHidden:false
end if
【讨论】: