how to get windowid from applescript

前端 未结 2 2007
闹比i
闹比i 2020-12-18 15:59

I am trying to get window id of of every window.

set r to {}
tell application \"System Events\"
    repeat with t in windows of processes
        set sid to          


        
2条回答
  •  南笙
    南笙 (楼主)
    2020-12-18 16:43

    This is not possible with this code.

    In the processes array of System Events the property id of a window is not required to be available in AppleScript, that's the reason why you get the error.

    If an application has an AppleScript dictionary and the windows element is provided then all windows have an id property, but not all applications support AppleScript and the non-document based applications don't provide the windows element by default.

提交回复
热议问题