• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSAppleScript error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSAppleScript error (From: Marco Cassinerio <email@hidden>)
 >Re: NSAppleScript error (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: website like ebay.com's flash content crashing webKit like app?
  • Next by Date: Re: NSDivideRect and 64-bit
  • Previous by thread: Re: NSAppleScript error
  • Next by thread: Re: NSAppleScript error
  • Index(es):
    • Date
    • Thread