NSAppleScript - executeAndReturnError & suspendExecution
NSAppleScript - executeAndReturnError & suspendExecution
- Subject: NSAppleScript - executeAndReturnError & suspendExecution
- From: Ken Victor <email@hidden>
- Date: Thu, 8 Nov 2007 13:10:06 -0800
my app uses [NSAppleScript executeAndReturnError] to execute apple
scripts from its scripts menu. this works fine for many of the
functions in my app that may be invoked via an applescript. however...
if the applescript tells my app to print something, then in my
handling of the script, i will call:
[NSAppleScript suspendExecution]
[NSPrintOperation runOperationModalForWindow: ...]
and then in the delegate for runOperationModalForWindow... i call
[NSAppleScript resumeExecutionWithResult:]
the problem is that calling resumeExecutionWithResult seems to
terminate the running script and executeAndReturnError returns with a
timed out error.
note that running the same applescript independently via script
debugger or script editor works fine.
this is on tiger.
is it not possible to call suspendExecution when executing a script
via executeAndReturnError?
thanx,
ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden