Tutorial: system.getAllWindows

system.getAllWindows

Retrieves an array of data (name, ids, bounds) for all application windows.

Example

fin.desktop.System.getAllWindows(function (windowInfoList) {
    windowInfoList.forEach(function (windowInfo) {
        console.log("Showing information for application with uuid: ", windowInfo.uuid);
        console.log("Main window: ", windowInfo.mainWindow);
        console.log("Child windows: ", windowInfo.childWindows);
    });
});

Window Info List

//This response has the following shape:
[
    {
        uuid: "uuid", //uuid of the application,
        mainWindow: {
            name: "windowName", //name of the main window,
            top: 42, //top-most coordinate of the main window,
            right: 42, //right-most coordinate of the main window,
            bottom: 42, //bottom-most coordinate of the main window,
            left: 42 //left-most coordinate of the main window
        },
        childWindows: [{
                name: "windowName", //name of the child window,
                top: 42, //top-most coordinate of the child window,
                right: 42, //right-most coordinate of the child window,
                bottom: 42, //bottom-most coordinate of the child window,
                left: 42 //left-most coordinate of the child window
            }]
    }
]