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,

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 - [email protected] 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

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, [email protected] 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 [email protected]
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: [email protected] 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

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")

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

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

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 > <[email protected]>, > 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 <[email protected]>, 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 ([email protected])

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

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

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

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

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

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

2009-01-31 Thread Bill Janssen
Ned Deily wrote: > In article <[email protected]>, 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 <[email protected]>, 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

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 <[email protected]>, 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

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

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'

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

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;

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

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

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

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

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

2008-04-14 Thread Ned Deily
In article <[EMAIL PROTECTED]>, John Ott <[EMAIL PROTECTED]> 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 = o

Re: [Pythonmac-SIG] appscript docs

2008-03-04 Thread Henning Hraban Ramm
Am 2008-03-04 um 02:10 schrieb has: >> Is there any reason why the appscript docs aren't available online? > The Ruby docs have been up awhile, but the Python and ObjC versions > are still to do. As with most OSS projects: lack of time/motivation/ > manpower and/or plain laziness - take your pick.

Re: [Pythonmac-SIG] appscript docs

2008-03-03 Thread has
Henning Hraban Ramm wrote: > Is there any reason why the appscript docs aren't available online? The Ruby docs have been up awhile, but the Python and ObjC versions are still to do. As with most OSS projects: lack of time/motivation/ manpower and/or plain laziness - take your pick. > The Hom

Re: [Pythonmac-SIG] appscript docs (was: Path conversions)

2008-03-02 Thread Henning Hraban Ramm
Am 2008-02-27 um 21:57 schrieb Ned Deily: > The macfile module of py-appscript was renamed to mactypes. So, with > the lastest versions of py-appscript, you'll need to change > macfile.Alias() to mactypes.Alias(). See the doc files included with > the py-appscript source download: appscript.so

Re: [Pythonmac-SIG] appscript create new iphoto album

2007-12-01 Thread has
David Voswinkel wrote: > But now iam stuck with the task to add a photo to a referenced album. AFAIK the only way to bring in image files is via the 'open' command, e.g.: iphoto.open([Alias('/path/to/image1.jpg'), Alias('/path/to/ image2.jpg')]) To add existing 'photo' objects to a

Re: [Pythonmac-SIG] appscript create new iphoto album

2007-11-28 Thread David Voswinkel
> You have to use its weird, non-standard 'new album' command (which > returns a broken reference, btw, so don't use that): > > app('iPhoto').new_album(name='New Album') Thx for that tip. But now iam stuck with the task to add a photo to a referenced album. I tried all kinds of app.add or

Re: [Pythonmac-SIG] appscript create new iphoto album

2007-11-21 Thread has
David Voswinkel wrote: > try to create an new iPhoto album, But cant get it working. Is this > a bug? > >> > app('iPhoto').make(new=k.regular_album, with_properties={ k.name : > 'New Album' }) The correct syntax would be: app('iPhoto').make( new=k.album,

Re: [Pythonmac-SIG] appscript and filemaker

2007-08-13 Thread has
On 13 Aug 2007, at 18:01, Karsten Wolf wrote: >>> Accessing this list item yields nothing; AEDesc.data='', >>> AEDesc.type='tdta'. >> >> What does the equivalent AppleScript give you? Appscript should give >> the same result. > > Ok. I've crosschecked with Frontier and AppleScript. > > I'm using F

Re: [Pythonmac-SIG] appscript and filemaker

2007-08-13 Thread has
Karsten Wolf wrote: > I'm new to python & appscript and try to control some FileMaker 9 > databases. Don't have a copy of FileMaker myself, but will try to help best I can. > I'd like to handle container fields (CF). > > Getting these in appscript is a little more difficult than in other >

Re: [Pythonmac-SIG] appscript

2007-02-26 Thread has
On 22 Feb 2007, at 20:47, Daniel Lord wrote: > My profile is close except I moved to Python 2.5: > Macbbok Pro Core 2 Duo, 2.33GHz, 2GB, 10.4.8 > > cannot reproduce, long pause while iTunes launches though... OK, thanks. I'm scratching my head; it doesn't seem to be a problem in appscript itsel

Re: [Pythonmac-SIG] appscript

2007-02-22 Thread Daniel Lord
My profile is close except I moved to Python 2.5: Macbbok Pro Core 2 Duo, 2.33GHz, 2GB, 10.4.8 cannot reproduce, long pause while iTunes launches though... [EMAIL PROTECTED] Thu Feb 22 11:44:38P [ 1 ] ~/ python Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build

Re: [Pythonmac-SIG] appscript

2007-02-22 Thread has
Christian Bird wrote: > I just found out about appscript and am attempting to use it on my > macbook pro (OS X 10.4.8 and python 2.4.3). I installed appscript, > but the following is what I get when I try to test it out. [...] > The same error appears regardless of which > app I try to control (

Re: [Pythonmac-SIG] appscript

2007-02-22 Thread Karsten Wolf
Hi, Am 22.02.2007 um 05:31 schrieb Christian Bird: > RuntimeError: Can't get terminology for application > (aem.Application(u'/Applications/iTunes.app')): CommandError -600: no > eligible process with specified descriptor Error -600 means the process isn't running. Some applications launch wh

Re: [Pythonmac-SIG] appscript with todos in iCal seams very slow

2006-08-09 Thread Marcin Komorowski
Has,Thank you.  Unfortunately, I have a list of UIDs for the todos I want to modify, so I think the best I can do is:for uid in uid_list:    todo = [ t for t in app('iCal').calendars.todos.filter( its.uid == uid ).get() if t != k.MissingValue ][0]    todo.stamp_date.set( datetime.datetime.today() )

Re: [Pythonmac-SIG] appscript with todos in iCal seams very slow

2006-08-08 Thread has
On 8 Aug 2006, at 01:49, Marcin Komorowski wrote: > I guess when I get to updating individual values in selected todos > records, I will have to use a relatively slow request-per-update > method. Is there a trick to update a field of a todo with a given > uid in a single request? You can s

Re: [Pythonmac-SIG] appscript with todos in iCal seams very slow

2006-08-07 Thread Marcin Komorowski
Thanks Has, this definitely did the trick. I guess when I get to updating individual values in selected todos records, I will have to use a relatively slow request-per-update method. Is there a trick to update a field of a todo with a given uid in a single request? Thanks, Marcin On 6-Aug

Re: [Pythonmac-SIG] appscript with todos in iCal seams very slow

2006-08-06 Thread has
Marcin Komorowski wrote: > I am trying to generate a python internal structure (a dictionary of > dictionaries) with a copy of all todo data from iCal. I got it to > work using the following code: > [...] > The problem is that this appears to execute painstakingly slowly. Apple event IPC is fair

Re: [Pythonmac-SIG] appscript with todos in iCal seams very slow

2006-08-06 Thread Henning Hraban Ramm
Am 2006-08-06 um 16:57 schrieb Marcin Komorowski: > I am trying to generate a python internal structure (a dictionary > of dictionaries) with a copy of all todo data from iCal. I got it > to work using the following code: > > The problem is that this appears to execute painstakingly slowly.

Re: [Pythonmac-SIG] appscript questions

2006-08-05 Thread has
Nicholas Riley wrote: > I agree - if the app quits, it should stay quit. Sometimes when I'm > trying to abort a script I quit an app that's being controlled, and to > see it relaunch over and over and over again... aaargh. OK. Plan is that: 1. run() and launch() will be allowed to relaunch an a

Re: [Pythonmac-SIG] appscript questions

2006-08-03 Thread Bob Ippolito
On Aug 3, 2006, at 3:49 PM, Dethe Elza wrote: > Ronald Oussoren wrote: > >> On Aug 3, 2006, at 7:08 PM, has wrote: >>> p.s. If anyone'd like to help me out a bit, I'd really like to get >>> all the manuals into the standard Python documentation format >>> now. So >>> if you're familiar with th

Re: [Pythonmac-SIG] appscript questions

2006-08-03 Thread Dethe Elza
Ronald Oussoren wrote: > On Aug 3, 2006, at 7:08 PM, has wrote: >> p.s. If anyone'd like to help me out a bit, I'd really like to get >> all the manuals into the standard Python documentation format now. So >> if you're familiar with the tools and would like to have a go then >> let me know - it'

Re: [Pythonmac-SIG] appscript questions

2006-08-03 Thread Ronald Oussoren
On Aug 3, 2006, at 7:08 PM, has wrote: Hi folks, Getting appscript prepared for the next release (only a couple away from beta now), and wondering if anyone has preferences on the following: 1. If a local application quits while a script is using it, either unexpectedly or because the client

Re: [Pythonmac-SIG] appscript questions

2006-08-03 Thread Nicholas Riley
On Thu, Aug 03, 2006 at 06:08:26PM +0100, has wrote: > So I'm more inclined towards the latter, but would like to know what > others think.) I agree - if the app quits, it should stay quit. Sometimes when I'm trying to abort a script I quit an app that's being controlled, and to see it relaunch o

Re: [Pythonmac-SIG] appscript equivalent of launch?

2006-07-20 Thread Robert Stephenson
Thanks, folks,  I thought I might have missed something.  I appreciate the suggestions and comments.  You guys are great!- RobOn Jul 20, 2006, at 9:33 AM, has wrote:Laurent Pierron wrote: Try that : os.system('osascript -e \'launch application "textedit"\'') Yeah, calling AS is a last-ditch option,

Re: [Pythonmac-SIG] appscript equivalent of launch?

2006-07-20 Thread has
Laurent Pierron wrote: > Try that : > > os.system('osascript -e \'launch application "textedit"\'') Yeah, calling AS is a last-ditch option, but I'm hoping someone'll know how to do it via the Python standard library or an OS call. (It'd be terribly ignominious for appscript to have to

Re: [Pythonmac-SIG] appscript equivalent of launch?

2006-07-20 Thread Laurent Pierron
Le 20 juil. 06, à 16:31, has a écrit : > Kevin Walzer wrote: > >> import os >> >> os.system('open -a TextEdit.app') > > Still ends up sending a run event, unfortunately. The goal is to > launch the app without it opening an empty document, as 'launch app > "TextEdit"' does. > Try that :

Re: [Pythonmac-SIG] appscript equivalent of launch?

2006-07-20 Thread has
Kevin Walzer wrote: > import os > > os.system('open -a TextEdit.app') Still ends up sending a run event, unfortunately. The goal is to launch the app without it opening an empty document, as 'launch app "TextEdit"' does. Ta, has -- http://freespace.virgin.net/hamish.sanderson/ __

Re: [Pythonmac-SIG] appscript equivalent of launch?

2006-07-20 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 has wrote: > Robert Stephenson wrote: > >> As far as I can see, appscript lacks an equivalent of Applescript's >> launch verb, which opens an app without running it (useful for apps >> like Textedit or Keynote that create default documents when th

Re: [Pythonmac-SIG] appscript equivalent of launch?

2006-07-20 Thread has
Robert Stephenson wrote: > As far as I can see, appscript lacks an equivalent of Applescript's > launch verb, which opens an app without running it (useful for apps > like Textedit or Keynote that create default documents when they > run). Did I miss something, or how can you open a file wi

  1   2   >