[Pythonmac-SIG] appscript terminology caching #2
has
hengist.podd at virgin.net
Thu Oct 21 16:26:07 CEST 2004
Hi all,
I've posted a demonstration of appscript + ATS for folks to try:
http://freespace.virgin.net/hamish.sanderson/appscript-0.8.0.tar.gz
http://freespace.virgin.net/hamish.sanderson/aem-0.3.2.tar.gz
Notes:
- You'll need to install ATS, appscript, etc. on every machine you
intend to script.
- For now you'll need to unstuff and launch ATS yourself. Suggest
using Process Viewer to check it's running ok before you start using
it.
- ATS'll write message to Console when caching and clearing
terminology, just to keep you informed.
- To clear the ATS cache, use:
tell application "AppscriptTerminologyServer" to «event ATSrClrC» -- local
tell application
"eppc://user:pass@ip-address/AppscriptTerminologyServer" to «event
ATSrClrC» -- remote
- Local application scripting works exactly the same as before, only faster.
- Remote scripting now works, e.g.:
#!/usr/local/bin/pythonw
from appscript import *
print app('eppc://has:foobar@0.0.0.10/TextEdit').documents[1].text.get()
- help() and htmldoc currently only work with local apps. If we go
with ATS I'll add support for remote apps too.
Let me know what you think.
Cheers,
has
p.s. Appscript's help() method is also becoming a nice unique selling
point. Currently AppleScripters have to shell out $$$ on Script
Debugger to get inheritance and containment tree graphical viewers;
appscript now has built-in text-based versions that work well in the
interactive interpreter. Give it a spin and see what you think;
suggestions for improvements and additions very welcome.
--
http://freespace.virgin.net/hamish.sanderson/
More information about the Pythonmac-SIG
mailing list