Yep:
CGEventSourceRef source =
CGEventSourceCreate(kCGEventSourceStateCombinedSessionState);
CGEventRef pasteCommandDown = CGEventCreateKeyboardEvent(source,
(CGKeyCode)9, YES);
CGEventSetFlags(pasteCommandDown, kCGEventFlagMaskCommand);
CGEventRef paste
On 5 Jan 2010, at 21:41, Jesse Grosjean wrote:
> Last, how would I go about sending Cmd-C/Cmd-V keystrokes directoy to
> another application?
Haven't done it myself, but I would guess CGEventCreateKeyboardEvent() and
friends would be simplest.
HTH
has
--
Control AppleScriptable applications
> Services no good?
Well originally I dismissed them because my understanding is that they
are meant to work in place. So there would be no time for the user to
do there work in the external editor. But now that I think about it I
could maybe use services in a bit more tricky manner. For example m
Jesse Grosjean wrote:
> I'm developing a small open source app called QuickCursor. [...]
Services no good?
Only alternative I can think of would be to send Cmd-C/Cmd-V keystrokes, and
hope that the user has the right text selected at the time.
has
--
Control AppleScriptable applications fro
If you have a solution to this, please report back. I am interested in what
you come up with.
--Nick Paulson
On Jan 5, 2010, at 11:10 AM, Jesse Grosjean wrote:
> I know most apps don't support AppleScript directly, but I thought
> there was some way to automatically script the menu items of mos
I know most apps don't support AppleScript directly, but I thought
there was some way to automatically script the menu items of most
apps.
But wait... I bet I can already call those menu items through the
accessibility API anyway! So I guess I probably don't need
AppleEvents. Thanks for your respo
Le 5 janv. 2010 à 16:46, Jesse Grosjean a écrit :
> I'm developing a small open source app called QuickCursor.
>
> - http://www.hogbaysoftware.com/products/quickcursor/
> - http://github.com/jessegrosjean/quickcursor
>
> The idea is to replace the input manage based "edit in" features with
> a
I'm developing a small open source app called QuickCursor.
- http://www.hogbaysoftware.com/products/quickcursor/
- http://github.com/jessegrosjean/quickcursor
The idea is to replace the input manage based "edit in" features with
a generic program that provides the same feature, but using public
A