我想用此代碼使用applescript更改圖像按鈕的圖像對象。如何設置圖像按鈕的圖像xcode aplescript OBJC
我已經試過這樣:
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
請保留你的帖子,不要在同一個問題上添加新帖子! –