Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: NSAppleScript timeout (SendToSelf) - urgent help needed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAppleScript timeout (SendToSelf) - urgent help needed

Sadly the behaviour isn't different when i put an ignore statement around it. Interestingly enough if you do the same using Script Editor, targetting Script Editor then everything works fine. no timeout. Script Editor too seems to be an Cocoa Multi Document application using OSAKit. So tt sould is possible to what i want to do.

The possibility of deadlock issues has occured to me. E.g. a deadlock issue appears when you trigger build of xcode using SubEthaEdit - Xcode then in turn asks subethaedit about open files and this times out. this can be resolved by not waiting for the response of using the suggested ingoring statement.

However what I really want to do is execute scripts as e.g. the global applescript menu does. So there is no direct need that SubEthaEdit is the actual executor, but it has to trigger the execution. So just running the script in some external execution environment would work too for me. Hacks like running the script using an NSTask using OSAScript come to my mind, but I thought NSAppleScript would be the right way to go and handle the problematic situations for me. And again - Script Editor has a way to do it.


On 19.04.2006, at 03:01, Dustin Voss wrote:

If it was your application itself, sending itself script commands, I'd say that you weren't considering deadlock issues -- that is, the app would be sending itself a script command and then waiting for the result to come back, preventing the command from actually being received and handled.

But I've always assumed that NSAppleScript took care of that stuff. Nonetheless, is the behavior different if you say "save front document ignoring result"?

On 18 Apr 2006, at 1:01 PM, Dominik Wagner wrote:

Hi everyone,

we'd like to put extensive scripting into the next release of SubEthaEdit, for this we need to run AppleScripts inside our application. Sadly even with simple things like "save front document" we get this error:
2006-04-18 21:48:30.695 Sketch[7005] executeError error:{
NSAppleScriptErrorBriefMessage = "AppleEvent timed out.";
NSAppleScriptErrorMessage = "Sketch got an error: AppleEvent timed out.";
NSAppleScriptErrorNumber = -1712;
NSAppleScriptErrorRange = <1d000000 13000000 >;

Although save is triggered, the rest of the script stops doing anyhting. How do we resolve this?

I put an slightly modified sketch application to:
all it does is add a menu item to the Tool menu that runs "tell application "Sketch" to save front document" via NSAppleScript and nslogs the error if any. The output is the one above.

Help is greatly appreciated,

P.S.: the only information i found in the net was http:// - an ancient technote that says that this behaviour is to be expected (of mac os 7).

Dominik Wagner          Mail: email@hidden
Blog - DasGenie: !Scrap

Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list (Applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

-- Dominik Wagner Mail: email@hidden TheCodingMonkeys Blog - DasGenie: !Scrap

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 >NSAppleScript timeout (SendToSelf) - urgent help needed (From: Dominik Wagner <email@hidden>)

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.