On 1/10/10 3:08 PM, Kevin Walzer wrote:
What's the best way to structure the command so that it can be seen from
AppleScript, i.e. run in the proper scope and not return an error?
Never mind about the scope question--I found that simply adding the
aemreceive bits and the custom function insi
On 1/6/10 4:58 AM, has wrote:
Though personally I'd be looking to add a proper AE API, even if only
procedural, so that users can't just run arbitrary code. But that's your
decision, not mine.
Following has's advice here, I'm trying to implement a basic API (set of
Python commands/functio
Kevin Walzer wrote:
> It appears that Tcl and Python differ in some respects in code execution.
> Python doesn't appear to return a value from code that is passed to the
> "exec" statement.
exec evaluates statements, and Python statements don't return values. You'd
need to pass global/local di
On 1/5/10 11:41 AM, has wrote:
If I understand you, Tk implements a 'do script' handler that executes
arbitrary Tcl scripts (right...no potential security issues there, then) and
you are installing your own 'do script' handler as well.
Yes, that's basically it.
If that's the case, make su
Kevin Walzer wrote:
> Now my app responds to Apple Events and doesn't complain about a corrupted
> dictionary. However, I'm having some additional difficulty. It appears that
> Apple Events are bypassing the bundled Python and are going straight to the
> Tk framework instead. Tk/Aqua has pretty
On 1/4/10 11:24 PM, Kevin Walzer wrote:
On 1/4/10 8:18 AM, Kevin Walzer wrote:
On 1/4/10 6:37 AM, has wrote:
This is very weird, and I have no clue how to untangle it. My app won't
respond to Apple Events at all without a valid sdef file in the bundle's
Resources directory. However, if the s
On 1/4/10 8:18 AM, Kevin Walzer wrote:
On 1/4/10 6:37 AM, has wrote:
Sounds like you forgot to add an OSAScriptingDefinition entry
containing the sdef's filename to your info.plist.
Also, bear in mind that sdef-only apps won't work in 10.4 or earlier;
if that's a concern then you'll need to pr
On 1/4/10 6:37 AM, has wrote:
Sounds like you forgot to add an OSAScriptingDefinition entry containing the
sdef's filename to your info.plist.
Also, bear in mind that sdef-only apps won't work in 10.4 or earlier; if that's
a concern then you'll need to provide an aete as well.
That worked,
Kevin Walzer wrote:
> I'm trying to use aemreceive to allow one of my Python applications to
> receive simple Apple Events.
> [...]
> The idea here is to allow the application to execute Python code in response
> to an Apple Event.
>
> I have included a simple SDEF file in the app bundle that a
Hi all:
I'm trying to use aemreceive to allow one of my Python applications to
receive simple Apple Events. Here's the relevant code that installs the
event handler:
from aemreceive import *
def doScript(script):
exec script
installeventhandler(
doScript,
'miscdosc',
10 matches
Mail list logo