>>911
ForegroundWindowやPointedWindowの情報をコンソールに出力してスクリプトを書いていくことができます。例を書いてみました
https://creviceapp.github.io/#/?id=find-out-the-target-application-window