Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to trigger a Copy in another application



At 7:49 -0700 30/9/05, Eric Schlegel wrote:
On Sep 30, 2005, at 3:47 AM, David Niemeijer wrote:

Hi,

I have been wondering what the best way is to trigger Edit Menu commands in other applications. I noticed that in the Speech System Preferences (under the Text to Speech) tab there is a feature that allows the user to speak any selected text when a particular keyboard shortcut is used. When using that key combination the front application's edit menu briefly highlights, which implies that it triggers a copy. However, I am assuming it cannot trigger that copy through sending the cmd-C keyboard shortcut because the user may already be holding down say control-shift-K to trigger the speak selected text function so sending cmd-C would actually result in control-shift-cmd-C. Anyway, that is what I would imagine would happen. Does anyone here know how Apple does it and wether it is a public thing that other apps can also use? Perhaps I am missing something extremely obvious...

Maybe through the accessibility API? You can invoke the AXPress action on a menu item and the Menu Manager will attempt to fool the app into calling MenuSelect.

Yes, through the Accessibility API this is indeed possible, but Access for Assistive Devices does not need to be on for the "speak selected text" function to work, so I figured there must be some kind of other solution that does not require the Accessibility API... I think that function even pre-dates the Accessibility API, but perhaps it uses some undisclosed API?


david.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >How to trigger a Copy in another application (From: David Niemeijer <email@hidden>)
 >Re: How to trigger a Copy in another application (From: Eric Schlegel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.