Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MartinCartier

macrumors newbie
Original poster
Jul 8, 2012
1
0
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.

thanks
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.