Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Controlling Cursor Programatically in OSX

Controlling Cursor Programatically in OSX
Thread Tools
Forum Regular
Join Date: Dec 2000
Location: Rehoboth Beach,DE USA
Status: Offline
Reply With Quote
Sep 2, 2001, 12:56 PM
 
I want to write a little app that allows the user to control the cursor using voice commands,to simulate mouse movement,click,double click,and click drag.I would like to write this in AppleScript as it would be easier to implement system-wide but I can't find a way to reference the cursor.If it is not possible to do in AppleScript I would like to know if anyone knows how to do this with the system API's I imagine it would be pretty complex,involving writing code for the Classic,Carbon,and Cocoa enviroments and some type of manager to handle switching from one enviroment to the other.Basically I want to enable system-wide support for voice activated cursor manipulation.Any info or advice anyone can give would be greatly appreciated.

[ 09-02-2001: Message edited by: Rick1138 ]

[ 09-02-2001: Message edited by: Rick1138 ]
     
Senior User
Join Date: Mar 2000
Location: Ithaca, NY
Status: Offline
Reply With Quote
Sep 3, 2001, 02:02 PM
 
Actually, you should be able to use CoreGraphics to do this. Take a look at the CGDisplayMoveCursorToPoint() function in CGDirectDisplay.h and CGPostMouseEvent() in CGRemoteOperation.h

You could even wrap it up in a scripting addition if you wanted, that way you could use it from an Applescript.
     
Forum Regular
Join Date: Dec 2000
Location: Rehoboth Beach,DE USA
Status: Offline
Reply With Quote
Sep 3, 2001, 10:30 PM
 
Thanks for the info,that's just what I was looking for
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:54 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2