• 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: ScriptingBridge Not working same as Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ScriptingBridge Not working same as Applescript


  • Subject: Re: ScriptingBridge Not working same as Applescript
  • From: Eric Wing <email@hidden>
  • Date: Sun, 12 Jun 2011 22:51:38 -0700

On 6/12/11, Abhinav Tyagi <email@hidden> wrote:
> Hi,
>
> I am trying to get the details of current track being played in iTunes
> from cocoa application. I am using ScriptingBridge
> by generating iTunes from the command line using
>
> The Applescript which i have successfuly tested in ScriptEditor is
>
> tell application "iTunes"
> 	set strSongTitle to (get name of current track)
> 	set strSongAuthor to (get artist of current track)
> 	set songClass to (class of current track)
> 	set currentPlayPosition to (player position)
> 	if songClass is URL track then
> 		set playURL to (get address of current track)
> 		set nCurrentTrackLengthInSeconds to (0)
> 	else
> 		set playURL to (get location of current track)
> 		set nCurrentTrackLengthInSeconds to (get duration of current track)
> 	end if
> 	set state to (get player state)
> end tell
>
> I am not sure why the currentStreamURL property of
> iTunesApplication:SBApplication is returning nil?
> Also pushed the sample to READ+WRITE GIT which can be found at:
> https://email@hidden/abhinavtyagi/iTunesCocoa.git
>
> I dont know if i am doing somenthing wrong with this.
> --
> Abhinav


I've noticed that some commands don't work even though they appear in
the dictionary. And some commands (e.g. playOnce) may have once
worked, but no longer. I don't really know why, and I don't know the
true relationship between AppleScript and ScriptingBridge.

I recommend filing a bug if you haven't already done so.

-Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
_______________________________________________

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: 
 >ScriptingBridge Not working same as Applescript (From: Abhinav Tyagi <email@hidden>)

  • Prev by Date: Re: Parent-child Design Pattern
  • Next by Date: Re: Memory Management for an Array
  • Previous by thread: ScriptingBridge Not working same as Applescript
  • Next by thread: Animating a NSProgressIndicator
  • Index(es):
    • Date
    • Thread