【发布时间】:2017-08-22 07:48:15
【问题描述】:
我正在尝试使用 applescript 使用此代码更改图像按钮的图像对象。
我试过这个:
property theButton : missing Value
on button_(sender)
set newImage to "example.png"
changeImage(newImage)
end button_
on changeImage(newImage)
set theImage to current application's NSImage's imageNamed_(newImage)
theButton's setImage_(theImage)
end changeImage
【问题讨论】:
标签: objective-c xcode macos user-interface applescript