Simulate mouse on Mac

Hello every one !
I have a virtual trackpad on my iPhone and to move my mouse I'm using this code one my mac :
CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, CGPointMake(((float)aD.msg)+location.x, ((float)aD.msg2)+location.y));
It's working well but this not a real mouse because when I put my mouse on my hidden dock, this one doesn't display it self. I don't understand why. More over I tried to simulate mouse click with :
case MOUSECLICK:
[self postMouseEventWithButton:0 withType:kCGEventLeftMouseDown andPoint:CGEventGetLocation(CGEventCreate(NULL))];
[self postMouseEventWithButton:0 withType:kCGEventLeftMouseUp andPoint:CGEventGetLocation(CGEventCreate(NULL))];
-(void)postMouseEventWithButton:(CGMouseButton)b withType:(CGEventType)t andPoint:(CGPoint)p
CGEventRef theEvent = CGEventCreateMouseEvent(NULL, t, p, b);
CGEventSetType(theEvent, t);
CGEventPost(kCGHIDEventTap, theEvent);
CFRelease(theEvent);
Where is my problem ?
Thanks for your help !

I don't know whether you ever discovered how to do this, but the source HIG omits other details on a Mac.
I've got code in my app's assignment of accelerators to use "meta" wherever the Windows/Linux stuff would've used "ctrl". In practice, this causes menu accelerators to use the Command key instead of the Control key.
In a couple of dialogs where multi-select should be supported, I've found that Command-click also works. This appears to be the case without any special coding on my part.
= Steve =

Similar Messages

  • Whats a good mouse for mac other then a mighty mouse?

    cause i've been though afew mighty mouses and i'm kinda getting tired of them breaking no matter what I do I can't get it to scroll up or to scroll left.
    and i've tried cleaning it didn't work so just going to get another mouse for it.
    what is a good alternative mouse for mac.
    around 50-75$?
    thats the only problem i've had out of apple is the mice they sell aren't as good as everything else they sell.

    Hi, 
    Apple mice have always been awful; I only ever liked the +ADB Mouse II+.
    I'm very happy with my Microsoft Intellimouse Optical six years on. The five buttons work really well with Dashboard, Exposé (and Spaces) and worked just as well back in OS9. The cable is also a decent length. I've also got a wireless version (1000) in grey/white with just three buttons, although the transceiver is quite chunky.
    Here's a five button Bluetooth version (link) that I've got my eye on at the moment.
    cheers
    mrtotes

  • Simulate mouse clicks inLabview

    Hi,
    I have a standalone driver that needs to be called many times in another VI, I don't know how to simulate mouse clicks in Labview to simulate a user running this VI. (This VI has a loop inside it, so it will run until a specific key is pressed)
    Thanks
    Solved!
    Go to Solution.

    If you need to programatically run the VI use the Run VI method of VI server. If you need to simulate users pressing buttons on that VI then use user events.
    Attached is an example of a main VI that calls a SubVI and sends events to it. Open the SubVI front panel but do not run it. Open the Top Level VI and run it. Pressing the OK button on the Top Level or the SubVI will increment the numeric indicator on SubVI. Same with the stop button.
    =====================
    LabVIEW 2012
    Attachments:
    Top Level VI.vi ‏14 KB
    SubVI.vi ‏21 KB

  • Simulate Mouse Click using AppleScript

    I want to simulate a mouse click using AppleScript. I used click button of window command but unfortunately it only simulates a half click in the sense that you see the button highlighted but the action is not activated. I used a command key function, where I would press a # many times to make the mouse go down. However, this is very slow. I noticed that there is a couple of additional elements that can be used with AppleScript for example XTools and Extra Suites where I can tell the mouse to go to a certain location and click. I am on a Mac OS X 10.3.9 system (I believe I am using a PowerMac as well) and would like to know if any of the two programs are compatible with this system. I would appreciate any help in how I can install the software and what directory to place the software. Thank you very much for your help.

    Hi, I don't know if the latest version works in 10.3, but might try Quickeys...
    http://startly.com/products/quickeys/mac/4/
    Extra Suites should tell you if it works or not when installing.
    For old Mac SW...
    http://www.oldapps.com/mac/?ModPagespeed=noscript
    I think the most modern Browser for Panther/10.3.9 is Camino...
    http://caminobrowser.org/releases/1.6.9/
    Or iCab 4.8...
    http://www.icab.de/dl.php

  • Razer Kayboard/Mouse and Mac Mini first Setup/Boot

    G'day Apple Support Communities,
    I'm purchasing a new MacMini in a few weeks. I'm wondering whether the new mac can detect/setup the mac compatible Razer kayboards and mouses upon first boot/setup. As I understand, a new mac will go through various steps, to select language and timezone. But when it needs to pair kayboards and mouses, will it detect the Razer gaming keyboards/mouses.
    Kayboard: Razer BlackWidow Ultimate
    http://au.razerzone.com/gaming-keyboards/mechanical/razer-blackwidow-ultimate/
    Mouse: Razer DeathAdder
    http://au.razerzone.com/razer-deathadder/
    Both peripherals claim to be Mac Compatible
    Ta, flakefrost

    hey!
    any mac can detect any usb mouse or keyboard, but depending on the company and the peripheral it's full functionality can be impaired or completely absent. for example the blackwidow ultimate keyboard has specific function keys for mac os x (mission control/expose) and a built-in macro automatization system which cannot be used without the driver for the keyboard. so the point is that you need the drivers :-)
    i have a razer blackwidow ultimate mac edition and a razer mamba 2012.
    the correct installation is as follows:
    1.) go to razerzone.com
    2.) move mouse over support
    3.) klick on drivers, software, manuals
    4.) find your product
    5.) download mac drivers
    6.) install drivers
    7.) plug in devices
    you have to restart after each individual driver installation and you should plug in the device after both drivers are installed, not before or during installation.
    last but not least the mac drivers are only compatible with mac os 10.5-10.6, mac os 10.7 lion is not compatible with the drivers. i found out the hard way through freezing of the computer and kernel panics. after a clean install of lion and the drivers, i had a kernel panic the second time i turned it on after the clean installation. @ Razer: where are the updates??!! :-(

  • Sluggish mouse on Mac Mini

    I have a Mac mini 2,7 Ghz i7 and a Mac bluetooth magic mouse and it is very sluggish, it sometimes swims around like it's not connected to my hand movements.
    I work fast, and I often have all my applications open (8Gb ram) - I used to work on a iMac 27" until recently - same workspace, same work surface, same environment, same work pattern -  but noo way did this mouse swim around like that.
    Anyone with the same experience?
    Could it be that the Mac mini simply isn't fast enough to handle it, or could it be a faulty motherboard??

    Reset your PRAM.
    Shut the Mac down completely.
    Holding the Cmd+Opt+P+R keys, press the power button.
    Listen for the "Startup chime" to sound three (3) times, and release the keys.
    It should work after that.

  • 2 button mouse for MAC

    I'm authoring a project on a PC but also need a MAC version.
    There are some functions that require a right mouse click. They
    work fine on the PC but can't get them to work on the MAC. I have
    emulateMultiButtonMouse = TRUE. I have a two button mouse on my
    MAC. Right clicking does not work and Control clicking does not
    work. Any ideas?

    Have you set;
    the emulateMultiButtonMouse = TRUE
    or;
    emulateMultiButtonMouse = TRUE
    If it isn't preceded by 'the' then it's just another
    variable. In MX2004 you could also use;
    _player.emulateMultiButtonMouse = TRUE

  • Attaching a corded mouse to Mac

    Can I attach a corded 2 button HP mouse with a scroll wheel to my G5 OSX V10.4 Mac (Tiger Operating System)? If so, how do I do it?

    Hello Carol:
    Welcome to Apple discussions.
    Assuming the mouse is compatible with OS X 10.4 (the HP web site should tell you that) and you have the proper driver, simply plug it into a USP port. Apples are plug and play.
    I use Apple mice, so I have no frame of reference for two button mice. However, I do know that many Mac users have two button mice attached to their systems.
    Barry

  • Windows Dual Button USB Mouse on Mac

    I am new to Mac and have no Mac mouse. Will my windows dual button usb mouse work with my powermac g3?

    Hi, pilot120 -
    In the absence of any mouse-specific software, if you're lucky the mouse will respond as if it were a one-button mouse (usually the default is the left-hand button being the active one).
    The OSX version of USB OverDrive may well make both buttons available, and programmable.
    There are several makers of multi-button (and scroll wheel) Mac-compatible mouses, such as Logitech, Microsoft, and Kensington. USB OverDrive usually works better with them than the software that comes with them.

  • Keyboard and Mouse for Mac mini Question

    I'm trying to convince my mom to buy a mac and she's probably going to get the cheaper mac mini.
    Question about the keyboard and mouse. Does it have to be apple? She doesn't want to spend more money on a keyboard and mouse, so can she use the old one from her old gateway or e-machine? If she can, that means she'll have to know which button are which with respect to the apple button and option, so I may just go ahead and buy her the apple keyboard anyways.
    And about the mouse, I assume any old mouse will work just fine?

    Unfortunately I can only speak english and a bit of French and German, but really not that much!
    How about this?
    La sua tastiera della Mamma ed il Topo inseriranno soltanto direttamente in un mac mini se usano il Connettore di USB standard. Se sono il più vecchio P/2 connettori di tastiera di stile e topo che sono arrotondato nella forma, dovrà comprare un dispositivo adattore piccolo che converte il collegamento in una forma di USB. Lei dovrebbe essere in grado di raccogliere questi dispositivi adattori per un paio di dollari / le libbre, ma il certianly un lotto meno di una serie di tastiera di USB e topo nuova, dunque nessuno bisogno preoccuparsi lí!
    -Pos

  • How to simulate mouse click

    Hello,
    is it possible to simulate and control a mouse click in windows with labview 7.1. I am able to control the mouse coordinates but not right and left mouse click. Is there a available VI that can do that?
    Lukas

    I have answered this in the other thread where you asked this. Please don't post the same questions to multiple threads.
    After looking at the VI there, it uses the PostMessage function to post a mouse down message to a specific window. You can try using MouseEvent or SendInput to simulate a general mouse click (One of them is no longer supported, I can't remember which. You can find the details in the MSDN).
    Try to take over the world!

  • Simulate mouse click on html control

    hello,
    i working on a multitouch application which should load some
    small html files in an html control.
    but i don't have a mouse so I need to simulate the click on a
    link in html etc.
    what i get to work is the down event so the link changes
    color but the it doesn't react on the up event.
    any ideas?
    thanks a lot
    joerg

    Insted of using an "<a href" type of link, and
    highlighting it with CSS you can create a custom <div>
    element, an assign to it javascript events onclick, onmousedown,
    onmouseup, that would do all the wrok.
    You can then fire those events from a diffrent
    function/event.

  • Ghost mousing for Mac

    i was wondering if there are any programs such as GhostControl 2.0 for Windows available for MAC machines?
    GhostMouse records system-level mouse events which can then be played back so the computer can execute recorded movements and operate applications on its own.
    i have yet to find a MAC version of this , so if anyone has any info, pls help me.
    thanks in advance .

    It sounds like QuickKeys is what you're looking for.
    However, you might also want to look at what it is you're trying to do, rather than how you're doing it. For example, to choose a menu item, screen recorders might track the mouse moving from point A to point B, clicking, dragging down and then releasing once the desired menu item is highlighted. In contrast, AppleScript lets you do this with something like 'click menu item "Blah" of menu "Blah"' which is much more direct, faster (doesn't need to worry about tracking the mouse), and doesn't interrupt the user's workflow (this can even happen while the target app is in the background and you're working on something else).
    AppleScripts can also handle more logic - perform actions under certain conditions which may or may not be the same as when the original was recorded.
    On the down side, not all applications support rich AppleScript dictionaries (the hooks into their internal commands that are the foundation of good AppleScripts) and in these cases falling back to the screen-based actions might be your only choice.

  • Can I use Logitech Performance mouse on mac book pro

    I can not instaled the softuer of logitech mouse (M/N M-R0007) performans on my mac book?
    Is this mouse compatible OS X, 10.9.1?
    Thanks in advance

    Looks as if the driver and other software for 10.9.x can be downloaded here -> http://www.logitech.com/en-us/support/performance-mouse-mx?section=downloads&bit =&osid=35.
    Good luck,
    Clinton

  • Simulate mouse clicks with keyboard

    Hello,
    I'd like to create a little tool in JAVA that would simulate a mouseclick when I pressed a key on the keyboard.
    But that should be valid even when I have any other program as active (selected).
    Can that be done in Java or Java can only listen to events generated when the java application is active?
    If you have working code that would be very appreciated.
    Thank you in advance,
    Nuno Vidal

    Ok... have never done anythong with JNI before, can
    you give me an insight?The way I would do it would be to write a system wide keyboard hook, (which you can't do in Java and should do in C++)into a JNI dll as smg123 said. Then you will have that method notify your java program on a key press and from your Java program you can use the Robot class to send a mouse click or since your already using a native code you could write a C++ function to do it and invoke that from your Java app.

Maybe you are looking for

  • Couldn't fetch the data from the data source...[nQSError: 16023]

    Hi all. I think that the problem I want to discuss is well-known, but still I got no answer whatever I tried ... I installed the BIEE on Linux (32 bit, OEL 5 - to be more precise), the complete installation was not a big deal. After that I installed

  • I am unable to purchase songs on iTunes.

    I'm sure this community has seen this issue posted a lot. But among all of the threads and potential fixes I have been unable to remedy my problem. For the last month and half or so iTunes has not allowed me to click on the button to purchase songs.

  • Online Archive Search Does Not Search Folders

    Outlook 2010 (14.0.7113.5000) SP2 MSO (14.0.7140.5002). We have multiple user that can search the archive and get results, but if the mail item is in a folder in the online archive it will not find it. Seems to be the same situation on OWA. Any guida

  • Where to set value of com.sap.spnego.uid.resolution.mode

    I am in the middle of configuring EP6 sp15 SSO using Kerberos. There is one step to adjust UME configuration to set  property com.sap.spnego.uid.resolution.mode of module SPNegoLoginModule. As far as I know, I should set it using visual administratio

  • EEM ping to file on flash for smtp - close but no cigar

    I have this script here and it has went throgh many tiny variations. event manager applet SMTP_EEM_TEST event syslog pattern " %SYS-5-CONFIG_I: Configured from console" action 1.0 cli command "ping x.x.xx. source FastEthernet 0/1" action 1.1 cli comm