Creating and detecting click events

Discussion in 'Mac Programming' started by Awesomeness, Jun 24, 2010.

  1. Awesomeness macrumors member

    Joined:
    Feb 12, 2009
    #1
    ...In any language. I have tried Applescript, some extra suites, searched online, but I cannot find a solution to this problem:

    I want a program to run in the background, and invoke control and left click whenever I right-click via the mouse.

    The reason why is because a buggy game I downloaded (that is a LOT of fun) only responds to control-click and not right click, and it's very annoying and makes me lose.

    I decided to apply my programming skills to solve this problem, but it's not enough and I'm growing desperate. Java has zero support because it wasn't made for that and it'd be a security flaw, Applescript doesn't have support for detecting clicks of any kind at all, and can only left click, and even if it could right click, it has zero support for holding it down.

    Is there anything at all that could solve my problem?
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    See this thread. Quartz Event Taps or the global NSEvent API in 10.6 can capture mouse clicks in other apps and inject events into the event system.
     

Share This Page