AHK Lib

发布时间 2023-07-25 11:25:49作者: fndefbwefsowpvqfx

Window

getAllWindow(){
    ids := WinGetList(,, "Program Manager")
    return ids
}
getWindowByTitle(title){
    allWin := getAllWindow()
    res := Array()

    for this_id in allWin
    {
        this_title := WinGetTitle(this_id)
        if(this_title == title) {
            res.Push(this_id)
        }
    }

    return res
}
printWindowTitle(ids){
    for this_id in ids
    {
        this_class := WinGetClass(this_id)
        this_title := WinGetTitle(this_id)
        MsgBox this_class, this_title
    }
}