• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to imitiate mouse move programmatically? [NSApp postEvent:atStart:] does not work...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to imitiate mouse move programmatically? [NSApp postEvent:atStart:] does not work...


  • Subject: Re: How to imitiate mouse move programmatically? [NSApp postEvent:atStart:] does not work...
  • From: Oleg Krupnov <email@hidden>
  • Date: Tue, 3 Nov 2009 14:59:52 +0200

Dave, I already tried CGEventPost() but it does not seem to work
either -- just nothing happens. I'd appreciate an example of working
code, I haven't been able to find any.

I also tried CGPostMouseEvent(). This works, but in a weird way -- it
actually moves the mouse cursor (kind of a too low-level thing), which
is not my intention, but even despite that, the corresponding mouse
moved event still does not occur in the NSApp, which puzzles me.
Besides I heard this function is deprecated in Snow Leopard, so I'd
not like to use it.

Thanks

On Tue, Nov 3, 2009 at 2:33 PM, Dave Keck <email@hidden> wrote:
> Untested suggestion: when a real mouse moved event occurs, NSLog it
> and duplicate its arguments exactly. Perhaps the '0' arguments are why
> it's not working.
>
> If that doesn't do the trick, you'll probably have to drop to a lower
> level, such as CGEventPost().
>
> ... but Graham's right - there's probably a better way :)
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How to imitiate mouse move programmatically? [NSApp postEvent:atStart:] does not work... (From: Oleg Krupnov <email@hidden>)
 >Re: How to imitiate mouse move programmatically? [NSApp postEvent:atStart:] does not work... (From: Dave Keck <email@hidden>)

  • Prev by Date: Overriding -[UIViewController loadView], and loading from a nib
  • Next by Date: Re: How to imitiate mouse move programmatically? [NSApp postEvent:atStart:] does not work...
  • Previous by thread: Re: How to imitiate mouse move programmatically? [NSApp postEvent:atStart:] does not work...
  • Next by thread: Linking Back to My CSS File.
  • Index(es):
    • Date
    • Thread