如何将“显示计数”从 AppleScript 转换为 JXA?

问题描述 投票:0回答:1

我正在学习 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

applescript javascript-automation
1个回答
0
投票

啊啊这样

var ie = Application("Image Events")
var d = ie.displays.length
© www.soinside.com 2019 - 2024. All rights reserved.