I finally got clicks forwarding to another process. I made an example
project, available here: http://www.docdave.com/clicktest.zip
NOTE: You have to setup the project first - in the Globals.h file,
define 'PID' to the process that you want clicks to be forwarded to,
and 'WID' to the window ID of
> There are actually 2 NSEvent methods that aren't in my local docs here at
> work, but are in the headers and on developer.apple.com:
>
> + (NSEvent *)eventWithCGEvent:(CGEventRef)cgEvent;
> - (CGEventRef)CGEvent;
Woops :) That could be why I wasn't able to send click events to other
apps' window
There are actually 2 NSEvent methods that aren't in my local docs here
at work, but are in the headers and on developer.apple.com:
+ (NSEvent *)eventWithCGEvent:(CGEventRef)cgEvent;
- (CGEventRef)CGEvent;
10.5-only, though.
On Apr 9, 2009, at 6:24 AM, Dave Keck wrote:
Is it possible to send
Ah, for some reason I interpreted your message as wanting to send
arbitrary messages to objects in another process. My mistake.
--Kyle Sluder
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comment
> I quickly tested CGEventPostToPSN() and was able to click Safari's
> menu bar from my test app, but was not able to click inside Safari's.
Sorry, that was meant to say:
...but was not able to click inside Safari's windows.
___
Cocoa-dev mailing list
> Is it possible to send a simulated mouse click to a specific window,
> overlapped by others?
CGEventPostToPSN() is what you want - but unfortunately it looks like
a little hackery will be involved to get it working. NSEvent has a
'windowNumber' property associated with it, but it doesn't look li
On Thu, Apr 9, 2009 at 6:50 AM, Benjamin Mollenhauer
wrote:
> Thanks for your quick answer. Maybe I was not specific enough:
> I want to control windows from foreign applications.
> Hence i tired it with the Accessibility API.
You can only do this with the accessibility API. By default this is
t
Is it possible to send a simulated mouse click to a specific window,
overlapped by others?
Benjamin - Have you tried creating your custom NSEvent objects and
passing
them to NSApplication's -sendEvent:?
Thanks for your quick answer. Maybe I was not specific enough:
I want to control window
2009/4/9 Benjamin Mollenhauer
> Hi!
>
> Is it possible to send a simulated mouse click to a specific window,
> overlapped by others?
Benjamin - Have you tried creating your custom NSEvent objects and passing
them to NSApplication's -sendEvent:?
NSEvent class reference
<
http://developer.apple
Hi!
Is it possible to send a simulated mouse click to a specific window,
overlapped by others?
The application i want to automate as no AXActions other than AXRaise
for the main window.
I already tried to focus the window and then click (via
CGPostMouseEvent), but this interferes with use
10 matches
Mail list logo