2

On windows, and with c#, I was able to capture another window's "screen", use that for processing, and then send user input events to that window. (which were generated by the program).

I would like to do the same with objective-c and within Mac OS X. So! Any resources or even a name for what I'm trying to do would be great. It's very frustrating to try and find information on this when the only ways i can think to phrase my searches are too ambiguous.

Thanks!

EDIT: As a specific example, there might be a particular game that I want to make an AI for. In that case I would need to be able to send mouse and keyboard events to the game.

Dominic
  • 23
  • 3
  • Usually on Mac OS X, you have to go quite far out of your way to inspect windows/memory of other processes. – dreamlax Jan 31 '11 at 07:06
  • See also: ["How do you test your Cocoa GUIs?"](http://stackoverflow.com/questions/545768/how-do-you-test-your-cocoa-guis) – outis Jan 31 '11 at 07:15

1 Answers1

1

If you're looking to do automated user interface testing, look at Squish, eggPlant, expect and OS X Accessibility. If you're looking to programmatically control another program, use scripting (if you wrote the program to control, add scripting support; otherwise, see what scripting support the program offers), or try Automator.

outis
  • 75,655
  • 22
  • 151
  • 221
  • Thanks! Though I am trying to write an AI for a simple game - i don't think it would have scripting support. It looks like eggPlant does what i'm *trying* to do, though for different reasons. – Dominic Jan 31 '11 at 07:34