Re: [Pythonmac-SIG] appscript dead?

2012-03-08 Thread Kevin Walzer
On 3/8/12 10:05 AM, Christian Prinoth wrote: Hi, Â I just learned that appscript development has been halted. I use it a lot, especially in scripts that automate interactions between Office and various other aspects of OSX. Does anyone know if there is any alternative coming up? More generally,

[Pythonmac-SIG] appscript dead?

2012-03-08 Thread Christian Prinoth
Hi, I just learned that appscript development has been halted. I use it a lot, especially in scripts that automate interactions between Office and various other aspects of OSX. Does anyone know if there is any alternative coming up? More generally, is there an official Apple roadmap on scripting

[Pythonmac-SIG] appscript 1.0 osax.OSAX() behavior

2011-05-04 Thread Adam Morris
Hello all, A while ago I wrote a Python class around appscript that would avoid (with calls to the shell osascript command) using the standard addition library's calls like display_dialog because it required the launch of Python Launcher, which slowed down the interaction with the user considerabl

[Pythonmac-SIG] Appscript and Excel save_as

2011-03-17 Thread Dan Ross
Hi there- I have the following AppleScript: set theOutputPath to (path to desktop folder as string) & "My Saved Workbook.csv" tell application "Microsoft Excel" tell active workbook save workbook as filename theOutputPath file format CSV file format end tell end tell This works fine. Whe

[Pythonmac-SIG] appscript module - creating k. type objects

2011-02-27 Thread Benjamin Golder
Hello, I'm learning and enjoying the appscript module, but I'm a little confused about how to instantiate basic k. type objects. for example, if I want to create a variable that holds a k.boolean value to use while scripting an application, how do I create it, and then pass it to the set() method

[Pythonmac-SIG] appscript = creating variables of basic k. types

2011-02-27 Thread Benjamin Golder
Hello, I'm learning and enjoying the appscript module, but I'm a little confused about how to instantiate basic k. type objects. for example, if I want to create a variable that holds a k.boolean value to use while scripting an application, how do I create it, and then pass it to the set() method

Re: [Pythonmac-SIG] appscript and Office 2011, not working? (has)

2011-02-18 Thread Christian Prinoth
Thanks, works great now! >excel = app('Microsoft Excel') >ws = excel.worksheets['Sheet1'] >excel.AS_newreference(ws.AS_aemreference.elements('X117'))[address] > > ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mai

Re: [Pythonmac-SIG] appscript and Office 2011, not working?

2011-02-17 Thread has
Christian Prinoth wrote: > My problem is that this way I can only reference a range in the currently > active worksheet. > Using standard appscript syntax I would do the following: > > app('Microsoft Excel').worksheets['Sheet1'].ranges['A1'].value() > > to access data on a specific cell on a spec

Re: [Pythonmac-SIG] appscript and Office 2011, not working?

2011-02-17 Thread Christian Prinoth
Has, thanks for your reply. I have tried doing what you suggest. the four char code for the range object is X117, so I did the following: app('Microsoft Excel').AS_newreference(aem.app.elements('X117'))['A1'].value() and this works fine in both Excel 2008 and Excel 2011. My problem is that this

Re: [Pythonmac-SIG] appscript and Office 2011, not working?

2011-02-13 Thread has
Christian Prinoth wrote: > Just upgraded to Office 2011, and it appears appscript is not working > correctly with Excel 2011. > > If I do the following: > > app(u'/Applications/Microsoft Office 2011/Microsoft > Excel').ranges[u'B2'].value() > > I get: > > AttributeError: 'Property' object has no a

[Pythonmac-SIG] appscript and Office 2011, not working?

2011-02-11 Thread Christian Prinoth
Just upgraded to Office 2011, and it appears appscript is not working correctly with Excel 2011. If I do the following: > app(u'/Applications/Microsoft Office 2011/Microsoft > Excel').ranges[u'B2'].value() I get: --- Attri

Re: [Pythonmac-SIG] appscript: Newbie trying to script using System Ev ents

2011-02-05 Thread Charles Turner
On Feb 5, 2011, at 1:15 PM, dgo...@juno.com wrote: > Given your feedback below, is appscript+System Events a reasonable approach > for test automation? I'm sure there are many with greater experience, but I'd second everything has said about scripting system events: brittle and fiddly pretty we

Re: [Pythonmac-SIG] appscript: Newbie trying to script using System Ev ents

2011-02-05 Thread dgo...@juno.com
ppscript+System Events a reasonable approach for test automation? FYI, there is Mac automation tool that doesn't rely on screen capture - called Squish. I've just started evaluating it. thanks, -Demian -- Original Message -- From: has To: pythonmac-sig@python.org Su

Re: [Pythonmac-SIG] appscript: Newbie trying to script using System Events

2011-02-05 Thread has
dgodon wrote: > Can anyone share some good examples of scripting System Events? For > instance, to select sub-menu options of an app, or to open/close app > windows, or dock panels in Photoshop. GUI Scripting's a last resort where applications don't provide a suitable scripting interface of

[Pythonmac-SIG] appscript: Newbie trying to script using System Events

2011-02-04 Thread dgo...@juno.com
Can anyone share some good examples of scripting System Events? For instance, to select sub-menu options of an app, or to open/close app windows, or dock panels in Photoshop. Thanks, -Demian $65/Hr Job - 25 Openings Part-Time job

[Pythonmac-SIG] appscript update - need help testing

2010-12-09 Thread has
Hi folks, I've just made a couple of changes to py-appscript: - now supports Python 3.2 (Python 3.0 is no longer supported due to C API changes) - eliminated the osax module's dependency on deprecated Carbon APIs (this should avoid problems for anyone submitting appscript-dependent applications

Re: [Pythonmac-SIG] appscript and mail.app, how to access attachments?

2010-10-05 Thread Ned Deily
In article , Christian Prinoth wrote: > I am trying the following: > > mail=app('mail') > msgs=mail.selection() > msg=msgs[0] > > now I would like to use > msg.mail_attachments > but this won't work. If I ask for help, under elements I get the following: > > Elements: > AEType("attc")

[Pythonmac-SIG] appscript & event

2010-10-01 Thread Jean-Lou Dupont
Hi, Is it possible to "subscribe" to events using py-appscript? Example: I'd like to be able to get callback when a user changes a rating on iTunes. See also: http://stackoverflow.com/questions/3842882 Thanks! Jean-Lou. ___ Pythonmac-SIG maillist -

[Pythonmac-SIG] appscript & events

2010-10-01 Thread Jean-Lou Dupont
Hi, Is it possible to "subscribe" to events using py-appscript? Example: I'd like to be able to get callback when a user changes a rating on iTunes. See also: http://stackoverflow.com/questions/3842882 Thanks! Jean-Lou. ___ Pythonmac-SIG maillist -

[Pythonmac-SIG] appscript and mail.app, how to access attachments?

2010-09-24 Thread Christian Prinoth
I am trying the following: mail=app('mail') msgs=mail.selection() msg=msgs[0] now I would like to use msg.mail_attachments but this won't work. If I ask for help, under elements I get the following: Elements: AEType("attc") -- by name, index, relative, range, test, id bcc_recipients

Re: [Pythonmac-SIG] Appscript unpredictable error

2010-08-05 Thread has
Sean DiZazzo wrote: I'm using appscript to do some work in Quicktime, and it keeps erroring out somewhat unpredictably. I am opening and closing lots of documents in quick succession when it happens. It doesn't happen every time, but about 70%-80% of the time. When it errors, it always

[Pythonmac-SIG] Appscript unpredictable error

2010-08-03 Thread Sean DiZazzo
Hi, I'm using appscript to do some work in Quicktime, and it keeps erroring out somewhat unpredictably. I am opening and closing lots of documents in quick succession when it happens. It doesn't happen every time, but about 70%-80% of the time. When it errors, it always errors trying to make a

Re: [Pythonmac-SIG] appscript fails to notice System Events is not running

2010-03-29 Thread has
Noah Coccaro wrote: > I have a long running server that uses appscript to send keystroke commands > to System Events. > It seems that System Events does not run constantly, or frequently dies. > Quite often, appscript seems to be in a state where it incorrectly thinks > System Events is runnin

Re: [Pythonmac-SIG] appscript fails to notice System Events is not running

2010-03-28 Thread Adam Morris
I use a function whose sole purpose is to return a reference to System Events to avoid this problem: import appscript as ap def getSystemEvents(): try: # ask System Events for processes to see if it's there throwaway = ap.app('/System Events').processes

[Pythonmac-SIG] appscript fails to notice System Events is not running

2010-03-28 Thread Noah Coccaro
I have a long running server that uses appscript to send keystroke commands to System Events. It seems that System Events does not run constantly, or frequently dies. Quite often, appscript seems to be in a state where it incorrectly thinks System Events is running, and still sends commands to it,

Re: [Pythonmac-SIG] appscript CommandError timeout - always before 2**16 transactions, sometimes well before

2009-11-18 Thread ken manheimer
heya, gary - thanks!! good to know. (and, good to hear from you - hope things are going well!) On Wed, Nov 18, 2009 at 3:08 PM, Gary Poster wrote: > Hey Ken. :-) > > It hung for me. > > Gary > > got a CommandError at count 57474 > Traceback (most recent call last): > File "", line 1, in > F

Re: [Pythonmac-SIG] appscript CommandError timeout - always before 2**16 transactions, sometimes well before

2009-11-18 Thread Gary Poster
Hey Ken. :-) It hung for me. Gary got a CommandError at count 57474 Traceback (most recent call last): File "", line 1, in File "", line 21, in first_timeout File "build/bdist.macosx-10.6-universal/egg/appscript/reference.py", line 504, in __call__ appscript.reference.CommandError: Comma

Re: [Pythonmac-SIG] appscript CommandError timeout - always before 2**16 transactions, sometimes well before

2009-11-18 Thread ken manheimer
On Fri, Nov 6, 2009 at 4:18 PM, Ned Deily wrote: > In article > <2cd46e7f0911061558r330573d0mc5ace6fa1d7b0...@mail.gmail.com>, > ken manheimer wrote: > > the behavior is an appscript.reference.CommandError timeout after some > > number of appscript transactions. there seems to be a hard limit

Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-18 Thread Bill Janssen
Ronald Oussoren wrote: > > Yes, that's part of the problem. The other part is that .pth handling > > seems to have changed from 2.5 to 2.6. > > That's news to me. I've been using zipped eggs with 2.6 without any > problems. Don't know that it had anything to do with eggs. What I was seeing wa

Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-18 Thread Bill Janssen
Ronald Oussoren wrote: > > On 17 Sep, 2009, at 23:50, Bill Janssen wrote: > > > Ronald Oussoren wrote: > > > >> Bill, > >> > >> Appscript probably gets installed as a zipped egg, the .python-eggs > >> directory gets created when a real filesystem path is needed for an > >> item in such an egg.

Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-17 Thread Ronald Oussoren
On 17 Sep, 2009, at 23:50, Bill Janssen wrote: Ronald Oussoren wrote: Bill, Appscript probably gets installed as a zipped egg, the .python-eggs directory gets created when a real filesystem path is needed for an item in such an egg. Yes, that's part of the problem. The other part is that

Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-17 Thread Ronald Oussoren
On 17 Sep, 2009, at 23:50, Bill Janssen wrote: Ronald Oussoren wrote: Bill, Appscript probably gets installed as a zipped egg, the .python-eggs directory gets created when a real filesystem path is needed for an item in such an egg. Yes, that's part of the problem. The other part is that

Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-17 Thread Ned Deily
In article <20090917234722.gb26...@panix.com>, Aahz wrote: > On Thu, Sep 17, 2009, Bill Janssen wrote: > > Ronald Oussoren wrote: > >> If you install appscript as an unzipped egg the problem should go away. > > How does one do that?> > You can unzip manually as with any other .ZIP file, or you

Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-17 Thread Aahz
On Thu, Sep 17, 2009, Bill Janssen wrote: > Ronald Oussoren wrote: >> >> If you install appscript as an unzipped egg the problem should go away. > > How does one do that? You can unzip manually as with any other .ZIP file, or you can do easy_install with -Z. -- Aahz (a...@pythoncraft.com)

Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-17 Thread Bill Janssen
Ronald Oussoren wrote: > Bill, > > Appscript probably gets installed as a zipped egg, the .python-eggs > directory gets created when a real filesystem path is needed for an > item in such an egg. Yes, that's part of the problem. The other part is that .pth handling seems to have changed from 2

Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-14 Thread has
On 14 Sep 2009, at 16:28, Bill Janssen wrote: has wrote: You can install appscript from source using plain old distutils; the setup.py script will use setuptools if it's available and distutils if not. Though if there are problems with setuptools then I'd suggest filing bug reports on tha

Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-14 Thread Bill Janssen
has wrote: > On 13 Sep 2009, at 18:52, Bill Janssen wrote: > > > Is it possible to disentangle appscript from setuptools? I just > > downloaded the sources to my Snow Leopard machine, did > > > > python setup.py build > > python setup.py install > > > > which went just fine. But then I did > >

Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-13 Thread Aahz
On Sun, Sep 13, 2009, Ronald Oussoren wrote: > > Appscript probably gets installed as a zipped egg, the .python-eggs > directory gets created when a real filesystem path is needed for an item > in such an egg. > > If you install appscript as an unzipped egg the problem should go away. My auto-i

Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-13 Thread has
On 13 Sep 2009, at 18:52, Bill Janssen wrote: Is it possible to disentangle appscript from setuptools? I just downloaded the sources to my Snow Leopard machine, did python setup.py build python setup.py install which went just fine. But then I did % python import appscript and got this

Re: [Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-13 Thread Ronald Oussoren
Bill, Appscript probably gets installed as a zipped egg, the .python-eggs directory gets created when a real filesystem path is needed for an item in such an egg. If you install appscript as an unzipped egg the problem should go away. Ronald On 13 sep 2009, at 19:52, Bill Janssen wrote

[Pythonmac-SIG] Appscript and Snow Leopard and setuptools...

2009-09-13 Thread Bill Janssen
Is it possible to disentangle appscript from setuptools? I just downloaded the sources to my Snow Leopard machine, did python setup.py build python setup.py install which went just fine. But then I did % python >>> import appscript and got this big stack trace because a ~/.python-eggs subdire

Re: [Pythonmac-SIG] Appscript and Snow Leopard

2009-09-13 Thread has
Norman Gray wrote: Did you force the reinstall? It appears so, since it reached the 10.6 appscript install. How do you do that? My own problem here [1] is that I can't work out how to make appscript play with python 2.6 (or 10.6). If the problem is that easy_install is installing appscr

Re: [Pythonmac-SIG] Appscript and Snow Leopard

2009-09-11 Thread Brad Howes
On Sep 11, 2009, at 11:48 AM, Norman Gray wrote: Did you force the reinstall? It appears so, since it reached the 10.6 appscript install. How do you do that? My own problem here [1] is that I can't work out how to make appscript play with python 2.6 (or 10.6). I thought I had used the -U o

Re: [Pythonmac-SIG] Appscript and Snow Leopard

2009-09-11 Thread Norman Gray
Greetings On 2009 Sep 11, at 15:02, Brad Howes wrote: Did you force the reinstall? It appears so, since it reached the 10.6 appscript install. How do you do that? My own problem here [1] is that I can't work out how to make appscript play with python 2.6 (or 10.6). Sorry. No idea what

Re: [Pythonmac-SIG] Appscript and Snow Leopard

2009-09-11 Thread Brad Howes
On Sep 11, 2009, at 12:03 AM, Noel Rappin wrote: I did reinstall. I'm still having the same problem with Appscript 0.20, Snow Leopard's Python 2.6.1 The issue happens in a different place each time, but the error looks like this: File "build/bdist.macosx-10.6-universal/egg/appscript/refere

Re: [Pythonmac-SIG] Appscript and Snow Leopard

2009-09-10 Thread Noel Rappin
I did reinstall. I'm still having the same problem with Appscript 0.20, Snow Leopard's Python 2.6.1 The issue happens in a different place each time, but the error looks like this: File "build/bdist.macosx-10.6-universal/egg/appscript/reference.py", line 504, in __call__ appscript.reference.Com

Re: [Pythonmac-SIG] Appscript and Snow Leopard

2009-09-10 Thread Brad Howes
On Sep 9, 2009, at 1:53 AM, has wrote: Noel Rappin wrote: I have a Python script that I've been using to communicate back and forth with iTunes via py-appscript -- it's worked fine for a long time. Snow Leopard seems to have broken it -- everytime I run the script, it stops, and then exits

Re: [Pythonmac-SIG] Appscript and Snow Leopard

2009-09-08 Thread has
Noel Rappin wrote: I have a Python script that I've been using to communicate back and forth with iTunes via py-appscript -- it's worked fine for a long time. Snow Leopard seems to have broken it -- everytime I run the script, it stops, and then exits, claiming that one of the commands has time

[Pythonmac-SIG] Appscript and Snow Leopard

2009-09-08 Thread Noel Rappin
I have a Python script that I've been using to communicate back and forth with iTunes via py-appscript -- it's worked fine for a long time. Snow Leopard seems to have broken it -- everytime I run the script, it stops, and then exits, claiming that one of the commands has timed out. It's never the

Re: [Pythonmac-SIG] appscript install

2009-09-08 Thread Ronald Oussoren
On 8 Sep, 2009, at 9:49, Kay Gottschalk wrote: Hi there, when I try to install appscript, I get the following errors: What release of OSX are you running? Do you use /usr/bin/python or some other Python installation (and if the latter, which one) Ronald smime.p7s Description: S/MIME

[Pythonmac-SIG] appscript install

2009-09-08 Thread Kay Gottschalk
Hi there, when I try to install appscript, I get the following errors: In file included from /System/Library/Frameworks/Carbon.framework/ Frameworks/HIToolbox.framework/Headers/CarbonEvents.h:40, from /System/Library/Frameworks/Carbon.framework/ Frameworks/HIToolbox.framework

Re: [Pythonmac-SIG] appscript with Quicktime - "Connection is invalid' error

2009-06-27 Thread has
Sean DiZazzo wrote: On a whim I tried the 0.20.0 version that was released today. To my surprise, export() has grown a new keyword... timeout! It's actually been around since the early days, although some older documentation wasn't as clear about it. Chapter 11 of the appscript manual li

Re: [Pythonmac-SIG] appscript with Quicktime - "Connection is invalid' error

2009-06-26 Thread Sean DiZazzo
On a whim I tried the 0.20.0 version that was released today. To my surprise, export() has grown a new keyword... timeout! Look like it's solved my problem so far... Talk about luck. Thanks. ~Sean On Fri, Jun 26, 2009 at 4:57 PM, Sean DiZazzo wrote: > Let me first say thank you. This is my fi

[Pythonmac-SIG] appscript with Quicktime - "Connection is invalid' error

2009-06-26 Thread Sean DiZazzo
Let me first say thank you. This is my first time playing with appscript, and it has been a joy to work with. It took me about a half hour of figuring out a few commands that I was trying to do. Then, all of a sudden, I was writing it almost as if I had known it for years. It scared me a bit at

Re: [Pythonmac-SIG] appscript install error using easy_install

2009-03-29 Thread Daryl Spitzer
Thanks for the quick reply Rajanikanth. I ran `sudo easy_install -U macholib==dev` (which I assume is what Russell intended) and got: Searching for macholib==dev Reading http://pypi.python.org/simple/macholib/ Reading http://undefined.org/python/#macholib Best match: macholib dev Downloading http

Re: [Pythonmac-SIG] appscript install error using easy_install

2009-03-29 Thread Rajanikanth Jammalamadaka
Hi Daryl, Try this( It was suggested by Russell): You might make sure your easy_install and macholib are up to date: each_install-U macholib==dev If that fails and tells you to do a selfupdate then do that and try again. -- Russell Thanks, Rajanikanth On Sun, Mar 29, 2009 at 9:18 AM, Dary

Re: [Pythonmac-SIG] appscript install error using easy_install

2009-03-29 Thread Daryl Spitzer
I just had the same problem. Did you find a solution? (I don't see any replies.) -- Daryl On Fri, Jan 23, 2009 at 2:18 AM, Rajanikanth Jammalamadaka wrote: > Hi! > > Does anybody know why I get this error? > sudo easy_install appscript > > Searching for appscript > Reading http://pypi.python.

Re: [Pythonmac-SIG] appscript path issue

2009-03-06 Thread Bill Janssen
> Jack Jansen wrote: > > > I wouldn't be surprised if the root of the problem is with > > PowerPoint. It started its life as an OS9 application, so if it still > > thinks it lives in an OS9 world with FSSpecs and colon-separated > > pathnames, it could be trying to do the conversion to posix pa

Re: [Pythonmac-SIG] appscript path issue

2009-03-05 Thread Bill Janssen
Jack Jansen wrote: > I wouldn't be surprised if the root of the problem is with > PowerPoint. It started its life as an OS9 application, so if it still > thinks it lives in an OS9 world with FSSpecs and colon-separated > pathnames, it could be trying to do the conversion to posix paths > itself

Re: [Pythonmac-SIG] appscript path issue

2009-03-05 Thread Jack Jansen
I wouldn't be surprised if the root of the problem is with PowerPoint. It started its life as an OS9 application, so if it still thinks it lives in an OS9 world with FSSpecs and colon-separated pathnames, it could be trying to do the conversion to posix paths itself. And such a conversion m

Re: [Pythonmac-SIG] appscript path issue

2009-03-05 Thread Bill Janssen
has wrote: > Bill Janssen wrote: > > > I'm trying to write this scrap of Applescript in Python appscript: > > > > on run > > tell application "Microsoft PowerPoint" > > set this_item to path of active presentation > > end tell > > set unix_item to POSIX path of this_item

Re: [Pythonmac-SIG] appscript path issue

2009-03-05 Thread has
Bill Janssen wrote: I'm trying to write this scrap of Applescript in Python appscript: on run tell application "Microsoft PowerPoint" set this_item to path of active presentation end tell set unix_item to POSIX path of this_item display dialog of

Re: [Pythonmac-SIG] appscript path issue

2009-03-04 Thread Bill Janssen
Bill Janssen wrote: > I'm trying to write this scrap of Applescript in Python appscript: > > on run > tell application "Microsoft PowerPoint" > set this_item to path of active presentation > end tell > set unix_item to POSIX path of this_item > display dia

[Pythonmac-SIG] appscript path issue

2009-03-03 Thread Bill Janssen
I'm trying to write this scrap of Applescript in Python appscript: on run tell application "Microsoft PowerPoint" set this_item to path of active presentation end tell set unix_item to POSIX path of this_item display dialog of unix_item end run

Re: [Pythonmac-SIG] appscript rocket-in-dock preventing logout

2009-01-31 Thread Bill Janssen
Ned Deily wrote: > In article <55150.1233433...@parc.com>, Bill Janssen > wrote: > > has wrote: > > > ...or prevent the OS from automatically upgrading your > > > python process to a GUI process (which it only does if it knows the > > > executable is located in an application bundle, e.g. Pyth

Re: [Pythonmac-SIG] appscript rocket-in-dock preventing logout

2009-01-31 Thread has
On 31 Jan 2009, at 20:18, Bill Janssen wrote: has wrote: ...or prevent the OS from automatically upgrading your python process to a GUI process (which it only does if it knows the executable is located in an application bundle, e.g. Python.app/ Contents/MacOS/python). Thanks! I'm not runnin

Re: [Pythonmac-SIG] appscript rocket-in-dock preventing logout

2009-01-31 Thread Ned Deily
In article <55150.1233433...@parc.com>, Bill Janssen wrote: > has wrote: > > ...or prevent the OS from automatically upgrading your > > python process to a GUI process (which it only does if it knows the > > executable is located in an application bundle, e.g. Python.app/ > > Contents/MacOS/pyth

Re: [Pythonmac-SIG] appscript rocket-in-dock preventing logout

2009-01-31 Thread Bill Janssen
Bill Janssen wrote: > I'm not running Python.app -- I'm running /usr/bin/python, which if I > follow the symlinks leads me to > /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5, > which in turn "file" shows to be a dual-architecture executable, which > in my case is "Mach-O

Re: [Pythonmac-SIG] appscript rocket-in-dock preventing logout

2009-01-31 Thread Bill Janssen
has wrote: > ...or prevent the OS from automatically upgrading your > python process to a GUI process (which it only does if it knows the > executable is located in an application bundle, e.g. Python.app/ > Contents/MacOS/python). Thanks! I'm not running Python.app -- I'm running /usr/bin/python

Re: [Pythonmac-SIG] appscript rocket-in-dock preventing logout

2009-01-31 Thread has
Bill Janssen wrote: We discussed this a bit last year, but with no resolution that I remember. I've got a situation where a Python program is preventing logout/shutdown. It's a script that just runs in an endless loop watching what app I'm working with; when it sees one it knows (Preview, M

[Pythonmac-SIG] appscript rocket-in-dock preventing logout

2009-01-30 Thread Bill Janssen
We discussed this a bit last year, but with no resolution that I remember. I've got a situation where a Python program is preventing logout/shutdown. It's a script that just runs in an endless loop watching what app I'm working with; when it sees one it knows (Preview, MS Word, Safari, etc.) it u

Re: [Pythonmac-SIG] appscript install error

2009-01-30 Thread has
Rajanikanth Jammalamadaka wrote: I get this error when trying to install appscript from source on Mac OS X(using python 2.6.1): ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is not of required architecture for architecture ppc collect2: ld returned 1 exit status lipo:

Re: [Pythonmac-SIG] appscript install error

2009-01-29 Thread Russell E. Owen
In article <84bdef3c0901281801n711713fagc12ecd27426bd...@mail.gmail.com>, Rajanikanth Jammalamadaka wrote: > hi! > > I get this error when trying to install appscript from source on Mac > OS X(using python 2.6.1): > > ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, > file i

[Pythonmac-SIG] appscript install error

2009-01-28 Thread Rajanikanth Jammalamadaka
hi! I get this error when trying to install appscript from source on Mac OS X(using python 2.6.1): ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is not of required architecture for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/fol

[Pythonmac-SIG] appscript install error using easy_install

2009-01-22 Thread Rajanikanth Jammalamadaka
Hi! Does anybody know why I get this error? sudo easy_install appscript Searching for appscript Reading http://pypi.python.org/simple/appscript/ Reading http://freespace.virgin.net/hamish.sanderson/appscript.html Reading http://appscript.sourceforge.net Best match: appscript 0.19.0 Downloading h

Re: [Pythonmac-SIG] appscript Python script preventing logout

2008-12-18 Thread Bill Janssen
has wrote: > copy Python.app's executable (.../Python.app/ > Contents/MacOS/Python) to /usr/local/bin/pythonb and use that to run > your scripts. Ah! That sounds easy. I'll try it. > aemreceive's sfba module lets you run an event loop, which you need to > handle any sort of incoming events, a

Re: [Pythonmac-SIG] appscript Python script preventing logout

2008-12-18 Thread has
Bill Janssen wrote: I'm having a bit of a problem with a Python script I'm running. It sits in a loop and periodically asks "System Events" what's going on, via appscript. The use of appscript turns it into a "foreground process", Yes, this is annoying and unnecessary behaviour; the proble

[Pythonmac-SIG] appscript Python script preventing logout

2008-12-16 Thread Bill Janssen
I'm having a bit of a problem with a Python script I'm running. It sits in a loop and periodically asks "System Events" what's going on, via appscript. The use of appscript turns it into a "foreground process", in the terminology used in http://developer.apple.com/DOCUMENTATION/MacOSX/Conceptual/

Re: [Pythonmac-SIG] Appscript

2008-12-12 Thread has
Conan C. Albrecht wrote: I'm using appscript to script Word and BibDesk. I need to run the script from the "Scripts" menu in one of these programs. However, my .py script won't show up on their menus, even if the script is in the right directory. I assume you're referring to BibDesk. I'

[Pythonmac-SIG] Appscript

2008-12-11 Thread Conan C. Albrecht
I'm using appscript to script Word and BibDesk. I need to run the script from the "Scripts" menu in one of these programs. However, my .py script won't show up on their menus, even if the script is in the right directory. The python script will show up on the system- wide scripts menu, bu

Re: [Pythonmac-SIG] appscript and launching apps from "background-only" Python processes

2008-10-29 Thread Bill Janssen
Ned Deily <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, Bill Janssen <[EMAIL PROTECTED]> > wrote: > > > I'm starting a Python daemon using SystemStarter, and in it I'm using > > appscript to launch an app (Entourage). I get the following error: > > > > CantLaunchApplicationErro

Re: [Pythonmac-SIG] appscript and launching apps from "background-only" Python processes

2008-10-29 Thread Bill Janssen
Ned Deily <[EMAIL PROTECTED]> wrote: > Also note that in 10.4, Apple introduced launchd which is intended to > replace the various startup mechanisms including SystemStarter. launchd > includes the capability to define system-wide as well as per-user > LaunchAgents (triggered by various condit

Re: [Pythonmac-SIG] appscript and launching apps from "background-only" Python processes

2008-10-28 Thread Ned Deily
In article <[EMAIL PROTECTED]>, Bill Janssen <[EMAIL PROTECTED]> wrote: > I'm starting a Python daemon using SystemStarter, and in it I'm using > appscript to launch an app (Entourage). I get the following error: > > CantLaunchApplicationError: CantLaunchApplicationError -606: Application is

[Pythonmac-SIG] appscript and launching apps from "background-only" Python processes

2008-10-28 Thread Bill Janssen
I'm starting a Python daemon using SystemStarter, and in it I'm using appscript to launch an app (Entourage). I get the following error: CantLaunchApplicationError: CantLaunchApplicationError -606: Application is background-only. If I start the same daemon from the command-line manually, it wo

Re: [Pythonmac-SIG] Appscript Python module / Applescript to python conversion

2008-10-09 Thread Ned Deily
In article <[EMAIL PROTECTED]>, Martin Tönnishoff <[EMAIL PROTECTED]> wrote: > Can you please help me to get this right? How do I convert a string to the > required "unicode_text" type wich is noth > the python builtin one. The error message is misleading you. The problem is not the string;

[Pythonmac-SIG] Appscript Python module / Applescript to python conversion

2008-10-09 Thread Martin Tönnishoff
Hello, sorry to annoy you with a noobish question but I just don't understand what I am doing wrong... I am relatively new to Python but its better than Applescript to me. Can you please help me to get this right? How do I convert a string to the required "unicode_text" type wich is noth the py

Re: [Pythonmac-SIG] appscript -- Getting 1708 Error on count command for word 2008

2008-08-16 Thread has
Travis Caldwell wrote: Not sure if this is user error or a bug, but I can't seem to send the count command to Word 2008 via appscript. Word's count command requires an 'each' parameter, e.g.: app('microsoft word').count(each=k.document) A number of Carbon apps do require an 'each' paramete

[Pythonmac-SIG] appscript -- Getting 1708 Error on count command for word 2008

2008-08-15 Thread Travis Caldwell
Not sure if this is user error or a bug, but I can't seem to send the count command to Word 2008 via appscript. >>> word.documents.count() Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.5/site-packages/appscript-0.18.1-py2.5-macosx-10.5-i386.egg/appscript/r

Re: [Pythonmac-SIG] appscript can't talk to 'System Events'?

2008-06-19 Thread Bill Janssen
Greetings from San Francisco Bay! Thanks for looking at this; it turned out that the problem was that I was running Leopard's X11. My system.log had lots of this: Jun 18 09:52:43 mymachine System Events[32983]: Unable to find class: X11Application, exiting Jun 18 09:52:43 mymachine com.apple.la

Re: [Pythonmac-SIG] appscript can't talk to 'System Events'?

2008-06-19 Thread Henning Hraban Ramm
Am 2008-06-19 um 19:16 schrieb Bill Janssen: So, here's another appscript problem: /Users/wjanssen 2 % python Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:16) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. from appscript im

[Pythonmac-SIG] appscript can't talk to 'System Events'?

2008-06-19 Thread Bill Janssen
So, here's another appscript problem: /Users/wjanssen 2 % python Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:16) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from appscript import * >>> app('System Events').processes()

Re: [Pythonmac-SIG] appscript and Firefox

2008-06-19 Thread Bill Janssen
Thanks, this is what I needed to know -- I'm hoping to avoid diving into the source. I'll download FF 2 and try it out. > appscript.terminology.dump() Not sure what you mean here. appscript.terminology doesn't have a "dump" function... Bill ___ Pytho

Re: [Pythonmac-SIG] appscript and Firefox

2008-06-19 Thread Bill Janssen
> But you can enter raw apple events which is what you want to do. > See here for and explanation of the brackets and how to enter them: > http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptLangGuide/conceptual/ASLR_raw_data.html Right, thanks, that's helpful. But how do I

Re: [Pythonmac-SIG] appscript and Firefox

2008-06-19 Thread Hengist Podd
Bill Janssen wrote:> But how do I write "<>" in appscript?You need to use the lower-level aem API to construct references/commands using raw AE codes. However, while both APIs are well documented in themselves, it's not currently explained to end users how to combine them in order to work around d

Re: [Pythonmac-SIG] appscript and Firefox

2008-06-18 Thread Daniel Lord
On Jun 18, 2008, at 20:18 PM, Bill Janssen wrote: Thanks, Daniel. It looks impossible from my perspective and knowledge, maybe someone smarter has it figured out. Apparently someone has, from the scrap of Applescript I pointed to before (OK, here it is again: https://bugzilla.mozilla.org/sh

Re: [Pythonmac-SIG] appscript and Firefox

2008-06-18 Thread Bill Janssen
Thanks, Daniel. > It looks impossible from my perspective and knowledge, maybe someone > smarter has it figured out. Apparently someone has, from the scrap of Applescript I pointed to before (OK, here it is again: https://bugzilla.mozilla.org/show_bug.cgi?id=427448). > Generally, the double an

Re: [Pythonmac-SIG] appscript and Firefox

2008-06-18 Thread Daniel Lord
On Jun 18, 2008, at 19:04 PM, Bill Janssen wrote: I'm finally trying to learn appscript, and I thought I'd write a little system monitor that goes around to my various open applications and logs what files/URLs I'm looking at. For Safari, this is easy: print app('Safari').windows.first.curre

[Pythonmac-SIG] appscript and Firefox

2008-06-18 Thread Bill Janssen
I'm finally trying to learn appscript, and I thought I'd write a little system monitor that goes around to my various open applications and logs what files/URLs I'm looking at. For Safari, this is easy: print app('Safari').windows.first.current_tab.URL() but I can't figure out how to get the c

[Pythonmac-SIG] appscript path problem from a newbie

2008-04-22 Thread John Ott
has solved my problem. I recently upgraded my OmniOutliner and had two copies floating around. Double clicking Projects.oo3 opened 3.6.2 and python was opening 3.6.5. Thanks. John * *

Re: [Pythonmac-SIG] appscript path problem from a newbie

2008-04-15 Thread has
John Ott wrote: > I am getting file not found errors from appscript. > > I manually open my OmniOutliner file Projets.oo3 first then from a > xterm > window: > > python > from appscript import * > oop = app('OmniOutliner Professional') > pod = oop.documents['Projects.oo3'] > > A second copy of O

  1   2   3   >