我正在学习 JXA,我什至对基本语法都有点困惑。
我想将这个非常基本的代码从 AppleScript 转换为 JXA。该怎么办?
tell application "Image Events"
set countOfDisplays to count of displays
end tell
我可以做到这一点,但我不知道“显示”或“计数”在哪里......
var ie = Application("Image Events")
var d = ie.displays // no
var d = ie.display // no
var d = ie.displays() // no
var d = ie.display() // no
啊啊这样
var ie = Application("Image Events")
var d = ie.displays.length