Welcome to MacBoardz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Controlling the Mouse and the Keyboard ???

 
   Macintosh computer (Home) -> Programmer Code RSS
Next:  Double Emails (Entourage)  
Author Message
Peter Olcott

External


Since: Oct 26, 2006
Posts: 19



(Msg. 1) Posted: Thu Oct 26, 2006 10:31 pm
Post subject: Controlling the Mouse and the Keyboard ???
Archived from groups: comp>sys>mac>programmer>misc, others (more info?)

Does anyone know how to do this?
Can you provide me any good links?

 >> Stay informed about: Controlling the Mouse and the Keyboard ??? 
Back to top
Login to vote
Gregory Weston1

External


Since: Oct 03, 2004
Posts: 2243



(Msg. 2) Posted: Fri Oct 27, 2006 9:48 pm
Post subject: Re: Controlling the Mouse and the Keyboard ??? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
"Peter Olcott" wrote:

> Does anyone know how to do this?
> Can you provide me any good links?

For the mouse, you place your hand over the top of the mouse. You may
either rest your hand on it or grasp it on the sides with your fingers.
Now move your hand around in a plane parallel to the ground.

What are you actually trying to do? What do you mean by "controlling the
mouse and keyboard?"

--
What I write is what I mean. I request that anyone who decides to respond
please refrain from "disagreeing" with something I didn't write in the first
place.

 >> Stay informed about: Controlling the Mouse and the Keyboard ??? 
Back to top
Login to vote
Peter Olcott

External


Since: Oct 26, 2006
Posts: 19



(Msg. 3) Posted: Fri Oct 27, 2006 9:48 pm
Post subject: Re: Controlling the Mouse and the Keyboard ??? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Gregory Weston" wrote in message

> In article ,
> "Peter Olcott" wrote:
>
>> Does anyone know how to do this?
>> Can you provide me any good links?
>
> For the mouse, you place your hand over the top of the mouse. You may
> either rest your hand on it or grasp it on the sides with your fingers.
> Now move your hand around in a plane parallel to the ground.
>
> What are you actually trying to do? What do you mean by "controlling the
> mouse and keyboard?"

Sorry I was too concise for anyone to see what I was saying. I am talking about
simulating the actions of a human user with software. MS Windows has several OS
functions for this purpose. mouse_event(), keybd_event(), and SendInput(). I
want to know whether or not Mac OS has this same sort of feature, and what the
feature would be called.


>
> --
> What I write is what I mean. I request that anyone who decides to respond
> please refrain from "disagreeing" with something I didn't write in the first
> place.
 >> Stay informed about: Controlling the Mouse and the Keyboard ??? 
Back to top
Login to vote
David Phillip Oste

External


Since: Apr 25, 2004
Posts: 974



(Msg. 4) Posted: Sat Oct 28, 2006 4:23 am
Post subject: Re: Controlling the Mouse and the Keyboard ??? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
"Peter Olcott" wrote:

> "Gregory Weston" wrote in message
>
> > In article ,
> > "Peter Olcott" wrote:
> >
> >> Does anyone know how to do this?
> >> Can you provide me any good links?
> >
> > For the mouse, you place your hand over the top of the mouse. You may
> > either rest your hand on it or grasp it on the sides with your fingers.
> > Now move your hand around in a plane parallel to the ground.
> >
> > What are you actually trying to do? What do you mean by "controlling the
> > mouse and keyboard?"
>
> Sorry I was too concise for anyone to see what I was saying. I am talking
> about
> simulating the actions of a human user with software. MS Windows has several
> OS
> functions for this purpose. mouse_event(), keybd_event(), and SendInput(). I
> want to know whether or not Mac OS has this same sort of feature, and what
> the
> feature would be called.
>

It is called "GUI Scripting". It is part o Universal Access. It is off by
default. It is off on over 90% of all Macs. It is a security hole. It
can be enabled by the user on the "Universal Access" panel of System
Preferences by selecting the [] Enable Access for Assistive Devices.

http://developer.apple.com/documentation/AppleScript/Conceptual/AppleS...ptX/Con

In addition, there are USB driver kits that show you how to write virtual
keyboards and mice. Installing these requires getting the user to agree
to a security dialog.

There are system calls in Core Graphics to move the mouse that are not
restricted.
 >> Stay informed about: Controlling the Mouse and the Keyboard ??? 
Back to top
Login to vote
Peter Olcott

External


Since: Oct 26, 2006
Posts: 19



(Msg. 5) Posted: Sat Oct 28, 2006 9:07 am
Post subject: Re: Controlling the Mouse and the Keyboard ??? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"David Phillip Oster" wrote in message

> In article ,
> "Peter Olcott" wrote:
>
>> "Gregory Weston" wrote in message
>>
>> > In article ,
>> > "Peter Olcott" wrote:
>> >
>> >> Does anyone know how to do this?
>> >> Can you provide me any good links?
>> >
>> > For the mouse, you place your hand over the top of the mouse. You may
>> > either rest your hand on it or grasp it on the sides with your fingers.
>> > Now move your hand around in a plane parallel to the ground.
>> >
>> > What are you actually trying to do? What do you mean by "controlling the
>> > mouse and keyboard?"
>>
>> Sorry I was too concise for anyone to see what I was saying. I am talking
>> about
>> simulating the actions of a human user with software. MS Windows has several
>> OS
>> functions for this purpose. mouse_event(), keybd_event(), and SendInput(). I
>> want to know whether or not Mac OS has this same sort of feature, and what
>> the
>> feature would be called.
>>
>
> It is called "GUI Scripting". It is part o Universal Access. It is off by
> default. It is off on over 90% of all Macs. It is a security hole. It
> can be enabled by the user on the "Universal Access" panel of System
> Preferences by selecting the [] Enable Access for Assistive Devices.
>
> http://developer.apple.com/documentation/AppleScript/Conceptual/AppleS...ptX/Con
>
> In addition, there are USB driver kits that show you how to write virtual
> keyboards and mice. Installing these requires getting the user to agree
> to a security dialog.

When you say USB kits do you mean that the keyboard and mouse can be
automatically controlled through using a USB hardware device, or can they be
controlled using software only?

>
> There are system calls in Core Graphics to move the mouse that are not
> restricted.
 >> Stay informed about: Controlling the Mouse and the Keyboard ??? 
Back to top
Login to vote
David Phillip Oste

External


Since: Apr 25, 2004
Posts: 974



(Msg. 6) Posted: Sat Oct 28, 2006 4:07 pm
Post subject: Re: Controlling the Mouse and the Keyboard ??? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
"Peter Olcott" wrote:

> When you say USB kits do you mean that the keyboard and mouse can be
> automatically controlled through using a USB hardware device, or can they be
> controlled using software only?

Gregory Weston said, if you want the keys to go up and down, you'll need
to use your fingers or other hardware.

See for yourself at:
http://developer.apple.com/hardwaredrivers/usb/
 >> Stay informed about: Controlling the Mouse and the Keyboard ??? 
Back to top
Login to vote
Peter Olcott

External


Since: Oct 26, 2006
Posts: 19



(Msg. 7) Posted: Sat Oct 28, 2006 4:07 pm
Post subject: Re: Controlling the Mouse and the Keyboard ??? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"David Phillip Oster" wrote in message

> In article ,
> "Peter Olcott" wrote:
>
>> When you say USB kits do you mean that the keyboard and mouse can be
>> automatically controlled through using a USB hardware device, or can they be
>> controlled using software only?
>
> Gregory Weston said, if you want the keys to go up and down, you'll need
> to use your fingers or other hardware.

It is not that way on MS Windows, SendInput() simulates the actions of a human
user on both the Mouse and the Keyboard. SendInput() replaces the older
mouse_event() and keybd_event() system calls.

>
> See for yourself at:
> http://developer.apple.com/hardwaredrivers/usb/
 >> Stay informed about: Controlling the Mouse and the Keyboard ??? 
Back to top
Login to vote
Jens Ayton

External


Since: Oct 21, 2006
Posts: 5



(Msg. 8) Posted: Sat Oct 28, 2006 8:58 pm
Post subject: Re: Controlling the Mouse and the Keyboard ??? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Peter Olcott:
>
> Sorry I was too concise for anyone to see what I was saying. I am talking about
> simulating the actions of a human user with software. MS Windows has several OS
> functions for this purpose. mouse_event(), keybd_event(), and SendInput(). I
> want to know whether or not Mac OS has this same sort of feature, and what the
> feature would be called.

CGEventCreateMouseEvent()
CGEventCreateKeyboardEvent()
CGEventPost()
CGEventPostToPSN()


--
Jens Ayton
 >> Stay informed about: Controlling the Mouse and the Keyboard ??? 
Back to top
Login to vote
Peter Olcott

External


Since: Oct 26, 2006
Posts: 19



(Msg. 9) Posted: Sat Oct 28, 2006 9:43 pm
Post subject: Re: Controlling the Mouse and the Keyboard ??? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Jens Ayton" wrote in message

> Peter Olcott:
>>
>> Sorry I was too concise for anyone to see what I was saying. I am talking
>> about
>> simulating the actions of a human user with software. MS Windows has several
>> OS
>> functions for this purpose. mouse_event(), keybd_event(), and SendInput(). I
>> want to know whether or not Mac OS has this same sort of feature, and what
>> the
>> feature would be called.
>
> CGEventCreateMouseEvent()
> CGEventCreateKeyboardEvent()
> CGEventPost()
> CGEventPostToPSN()
>
>
> --
> Jens Ayton

That is exactly what I needed, thanks.
 >> Stay informed about: Controlling the Mouse and the Keyboard ??? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Automatically controlling the mouse and keyboard for GUI s.. - Can this be done in Mac OS, and how is it done?

mouse confusion - For some reason my app can't distinguish between left and right mouse buttons anymore - both buttons send "right button" events. This used to work, till I upgraded to OSX 10.3, still works fine on my 10.2 laptop. The buttons work right generall...

right mouse button ? - Hello Under carbon, how can i have the state of the right mousebutton asynchronously ? ( the equivalent of Button() but for the other button ) Thank you pat.

Changing mouse location - Hello, Is there any way to change the mouse pointer location under Carbon/MacOS X ? I've found severals ways to do this under OS 9, but nothing for MacOS X/Carbon ? David

How to set mouse acceleration (System 7) - Hello. Is there an OS API to set mouse cursor acceleration (as from the control panel) on an old System 7 macintosh (mac SE/30)? I am using Apple's MPW and c++. Thanks.
   Macintosh computer (Home) -> Programmer Code All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]