Re: Using AppleEvents to copy and past text from any application
Re: Using AppleEvents to copy and past text from any application
- Subject: Re: Using AppleEvents to copy and past text from any application
- From: Nick Paulson <email@hidden>
- Date: Tue, 5 Jan 2010 14:38:40 -0500
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 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 response, made me think just a bit
> furthur I can probably work through this solution myself now.
>
> Jesse
>
> On Tue, Jan 5, 2010 at 11:02 AM, Jean-Daniel Dupas
> <email@hidden> wrote:
>>
>> 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 generic program that provides the same feature, but using public
>> API's instead of input manage hacks.
>>
>> Right now QuickCursor works through the accessibility api to
>> read/write text from the target app. This works well for many apps
>> (ones that expose their text as a single writable string attribute to
>> the accessibility api), but not all apps do that. And as a result
>> QuickCursor doesn't work everywhere. And so I'm looking for an
>> alternative idea. The accessibility api also has a problem that it
>> seems to mess up the undo stack in some programs.
>>
>> Someone suggested that I use AppleEvents to automate select
>> all/copy/paste out of and then back into the target app. That would
>> seem to be a greate approach, but I'm not sure how to do it. Is there
>> anyone on this list who would be willing to help?
>>
>> I'm not sure this is the way to go.
>> You will encounter the same issue than with Accessibility API. The target
>> application has to support it.
>> In fact, I'm pretty sure there is far less app with scriptability enabled
>> than app with accessibility available.
>> -- Jean-Daniel
>>
>>
>>
>>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden