Re: Scripting Bridge for GUI scripting?
Re: Scripting Bridge for GUI scripting?
- Subject: Re: Scripting Bridge for GUI scripting?
- From: has <email@hidden>
- Date: Thu, 29 Apr 2010 20:31:05 +0100
Louis-Philippe wrote:
> I am looking around and I can't find docs about GUI scripting from the
> Scripting Bridge... it seems like NSAppleScript would do it, but I would
> like it better if I could do it with objective-c logic. Anybody has worked
> around something like that?
Given that GUI scripting is inherently nasty and fragile, and prone to breaking whenever target applications are updated, I'd personally keep that code as compiled AppleScripts (.scpt files) stored within the .app bundle for ease of maintenance.
Alternatively, if you really want to use [Obj]C, you could cut out AppleScript/System Events entirely and just talk directly to Mac OS X's Accessibility APIs (which is what System Events does).
Or, you could always try poking the developer of the target application to provide some sort of externally accessible API (Apple events/Distributed Objects/SOAP/sockets/shared framework/whatever) and avoid all that nastiness entirely. That would be the best solution, of course.
HTH
has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net
_______________________________________________
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