Controling other windows on mac os x, is it possible?

Discussion in 'Mac Programming' started by MartinCartier, Jul 8, 2012.

  1. MartinCartier macrumors newbie

    Jul 8, 2012
    i'm working on a software in C, that runs in the background and lists all windows on the desktop periodically, and when a specific word is found (for example por*) this window is closed automatically, but not the whole process.

    i'm using "CGSGetOnScreenWindowList" to get a list of all windows, but i have no idea how to close or hide a specific window.

  2. larkost macrumors 6502a

    Oct 13, 2007
    You are going to need to use AppleEvents. This can be done useing C or ObjC, but my advice is that this is best done in AppleScript.

Share This Page