Listing all windows of all applications

后端 未结 2 862
说谎
说谎 2020-12-30 12:56

I am trying to write an applescript script that resizes all open windows. In order to make sure that I\'m getting to all the windows, I\'m making my script say the name of t

2条回答
  •  春和景丽
    2020-12-30 13:32

    I create a list of all open windows of visible applications on Mavericks like this:

    tell application "System Events"
        set this_info to {}
        repeat with theProcess in (application processes where visible is true)
            set this_info to this_info & (value of (first attribute whose name is "AXWindows") of theProcess)   
        end repeat
        this_info -- display list in results window of AppleScript Editor 
    end tell
    

    You need to allow any app using this to access the interface under Accessibility.

提交回复
热议问题