Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python tricks with applescript in OS-X

Reply
Thread Tools

Python tricks with applescript in OS-X

 
 
joanmg@gmail.com
Guest
Posts: n/a
 
      12-11-2009
Greetings,

I've written a short document with some working examples of how to
interface python with other applications in OS-X via applescript (had
to spend some time figuring it out, and thought I might as well write
it down). The examples include asking Google Earth for the latitude
and longitude of the point at the center of its screen, or using the
finder to pop-up a dialog window to get input from the user:

http://juanreyero.com/article/python/os-x-python.html

Cheers,

Juan
http://juanreyero.com
 
Reply With Quote
 
 
 
 
Kevin Walzer
Guest
Posts: n/a
 
      12-11-2009
On 12/11/09 3:13 AM, wrote:
> Greetings,
>
> I've written a short document with some working examples of how to
> interface python with other applications in OS-X via applescript (had
> to spend some time figuring it out, and thought I might as well write
> it down). The examples include asking Google Earth for the latitude
> and longitude of the point at the center of its screen, or using the
> finder to pop-up a dialog window to get input from the user:
>
> http://juanreyero.com/article/python/os-x-python.html
>
> Cheers,
>
> Juan
> http://juanreyero.com


Thanks for these examples.

There is also a Python package that allows you to interface with an
application's AppleScript dictionary via Python itself, without the
intermediate step of using the osascript command-line tool:

http://appscript.sourceforge.net/

You might find that of interest.

--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
 
Reply With Quote
 
 
 
 
Juanre
Guest
Posts: n/a
 
      12-16-2009
Thanks for the pointers to appscript, and for the comments on the
page. I have changed the examples at http://juanreyero.com/article/python/os-x-python.html
to reflect them.

Cheers,

Juan
--
http://juanreyero.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
applescript/python question Python 2 08-02-2008 03:26 PM
Calling Mac programs from Python instead of from AppleScript dvschorre@sbcglobal.net Python 3 03-20-2008 12:08 PM
Ruby OSA "AppleScript" for the Macintosh Phrogz Ruby 3 09-07-2006 08:26 PM
applescript and java logiclips@yahoo.com Java 3 01-09-2006 11:28 PM
Calling an applescript with parameters Jon Fogh Java 3 04-25-2005 04:21 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57