You need to share you applescript and this error with us. :)

--Kyle Sluder

I tried a lot of AS and the error is related to the AS request.
For example, this to get the current playing track in iTunes:

tell application "iTunes"
        set curr_path to get location of current track
        return POSIX path of curr_path
end tell

The error:

    NSAppleScriptErrorAppName = iTunes;
NSAppleScriptErrorBriefMessage = "Can\U2019t get location of current track."; NSAppleScriptErrorMessage = "iTunes got an error: Can\U2019t get location of current track.";
    NSAppleScriptErrorNumber = -1728;
    NSAppleScriptErrorRange = NSRange: {47, 8};

I've found a (ugly) solution to overcome the problem. I've build a command line tool that will run the apple script as it's passed by the argv. The Service has just to launch the command line tool as a task and pass the script text as first argument.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to