Re: [ann] TextCommands 0.4.0
Re: [ann] TextCommands 0.4.0
- Subject: Re: [ann] TextCommands 0.4.0
- From: has <email@hidden>
- Date: Thu, 26 May 2005 11:30:50 +0100
Jean-Baptiste Le Stang wrote:
>What is really missing is a complete example of a scriptable application with classes, elements, properties. Maybe that has will provide us with that :p
The sfba module, which is what TextCommands uses, is only really intended for making quick-n-dirty procedural wrappers around Python code so you can call it from AppleScript. e.g. TextCommands' unicode numbers command is just three lines of code:
def unicodeNumbers(text):
return [ord(c) for c in text]
installEventHandler(unicodeNumbers, 'TeCoUnum', ('----', 'text', _k.typeUnicodeText))
There's nothing to stop you from resolving application references yourself - I'll show how to do it for getting and setting top-level properties - but it's a non-trivial amount of work for more complex object model support. If you want to do a full-blown Apple event object model then Cocoa Scripting is probably your best bet for now; I've not tried it in Python myself but it should be quite doable via PyObjC.
...
Anyway, seems like there's some interest in sfba, so I'll start on a tutorial shortly and let folk know when it's available.
Cheers,
has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden