Re: NSAppleScript error
Re: NSAppleScript error
- Subject: Re: NSAppleScript error
- From: Marco Cassinerio <email@hidden>
- Date: Sun, 6 Sep 2009 21:30:58 +0200
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 (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