AppleScript获取属性赢得';t当应用程序处于全屏时返回值

AppleScript获取属性赢得';t当应用程序处于全屏时返回值,applescript,Applescript,当终端应用程序(或任何应用程序)未处于全屏模式时,此脚本工作。它将返回正确的false值。当您使应用程序全屏显示时,它将返回任何空值。我唯一能想到的是,当你全屏显示时,它会把它放在不同的桌面上?现在是全屏的,我是否错过了一些可以以不同方式激活应用程序的东西 tell application "System Events" to set the visible of every process to true set white_list to {"Finder", "AppleScript Ed

当终端应用程序(或任何应用程序)未处于全屏模式时,此脚本工作。它将返回正确的false值。当您使应用程序全屏显示时,它将返回任何空值。我唯一能想到的是,当你全屏显示时,它会把它放在不同的桌面上?现在是全屏的,我是否错过了一些可以以不同方式激活应用程序的东西

tell application "System Events" to set the visible of every process to true
set white_list to {"Finder", "AppleScript Editor", "Google Chrome"}

tell application "System Events"
    set process_list to the displayed name of every process whose visible is true
    set process_number to (number of items in process_list)
    set myList to process_list
end tell

repeat with theItem in myList
    if theItem is not in white_list then
        log theItem
        tell application "System Events" to tell process theItem
            set isFullScreen to the value of attribute "AXFullScreen" of windows
        end tell
    end if
end repeat
return theItem & " application is FullScreen: " & isFullScreen

这句话写得不好

set isFullScreen to the value of attribute "AXFullScreen" of windows
“windows”将返回一个窗口列表,而您无法从列表中获取该属性。所以你想把它写成

set isFullScreen to the value of attribute "AXFullScreen" of window 1
然而,说到这里,我尝试了这个,似乎你无法从全屏进程中获得窗口。窗口列表始终为空{}。因此,这种确定应用程序是否全屏显示的方法将不起作用


您需要考虑另一种方法来确定应用程序是否是全屏的。我试了两件事,却找不到解决办法。对不起。

谢谢。我采用窗口1方法,得到了相同的结果。我现在正在研究一些使用python的方法。