I have some apps that keep popping up ad windows. I want to find a way to automatically close certain app windows as soon as they appear. On Windows, I normally make a simple app in AutoIt and run it. What are my options on OS X?
You could save a script like this as a stay open application in AppleScript Editor:
You can open it at login by adding it to login items.
Closing windows with System Events:
I use this function to connect to a 3G network:
You could take a look up AutoIt alternatives on Stack Overflow.
If you're not bound to an App per se, you might also wanna take a look at Apple Script and take away a built-in language you might actually use even in an other Context.