如何在ApplescriptObjC中获取滑块的值?
如何在ApplescriptObjC中获取滑块的值?,applescript,applescript-objc,Applescript,Applescript Objc,属性滑块:缺少值 如果滑块的integerValue=5,则 --做点什么 如果 这个代码不起作用。知道为什么吗?滑块integerValue的log类返回一个名为\uu NSCFNumber log class of 5返回 看起来Applescript不会自动为您转换值。要使其工作(外观奇怪)转换将执行以下操作: if slider's integerValue as integer = 5 then -- Do something end if 您好,Michael/Hambu
属性滑块:缺少值
如果滑块的integerValue=5,则
--做点什么
如果
这个代码不起作用。知道为什么吗?
滑块integerValue的log类
返回一个名为\uu NSCFNumber
log class of 5
返回
看起来Applescript不会自动为您转换值。要使其工作(外观奇怪)转换将执行以下操作:
if slider's integerValue as integer = 5 then
-- Do something
end if
您好,Michael/HamburgintegerValue()返回一个cocoa类。如果要在Applescript中进一步使用数字,您总是希望显式地将数字强制到Applescript类中,以便在获取值时添加“as integer”。