• 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
Xcode Yosemite 10.10.1 cocoa-Applescript iTunes Tell blocks not being called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xcode Yosemite 10.10.1 cocoa-Applescript iTunes Tell blocks not being called


  • Subject: Xcode Yosemite 10.10.1 cocoa-Applescript iTunes Tell blocks not being called
  • From: Mark Hunte <email@hidden>
  • Date: Sun, 23 Nov 2014 04:42:47 +0000

Hi,

I could have sworn earlier in the day  tell blocks for iTunes was working.  I am not 100% sure because I am also using the "com.apple.iTunes.playerInfo" in the real app.

But below is a Simple cocoa-Applescript written in Xcode Version 6.1 (6A1052c) which is also exhibiting the same behaviour.

The direct tell application "iTunes" to work but the tell block does not. Annoying and odd..

Is anyone else getting this oddness?? anyone know what is going on??

 script AppDelegate
property parent : class "NSObject"


-- IBOutlets
property theWindow : missing value


on applicationWillFinishLaunching_(aNotification)
  -- tell application "iTunes" to playPause
     -- tell application "iTunes" to playPause

     

      --##THIS WORKS
      tell application "iTunes" to   set currentTrackName to name of current track as string
      log "iTunes currentTrackName " & currentTrackName


--## THIS TELL BLOCK DOES NOT GET ENTERED ??
        tell application "iTunes"
            log "HERE"
            set currentTrackName to name of current track as string

            

            set trackNumber to track number of current track as string
            set albumArtist to album artist of current track as string
            if albumArtist contains "missing value" or albumArtist is "" then
                set albumArtist to  artist  of current track as string
            end if
            set trackCount to track count of current track as string

            

            log "iTunes albumArtist " & albumArtist

            

        end tell
end applicationWillFinishLaunching_


on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits 
return current application's NSTerminateNow
end applicationShouldTerminate_


end script
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Xcode Yosemite 10.10.1 cocoa-Applescript iTunes Tell blocks not being called
      • From: Shane Stanley <email@hidden>
References: 
 >Scripting alerts (From: Shane Stanley <email@hidden>)
 >Re: Scripting alerts (From: Shane Stanley <email@hidden>)
 >Re: Scripting alerts (From: Shane Stanley <email@hidden>)
 >Re: Scripting alerts (From: Shane Stanley <email@hidden>)
 >Re: Scripting alerts (From: Shane Stanley <email@hidden>)
 >Re: Scripting alerts (From: Shane Stanley <email@hidden>)
 >Re: Scripting alerts (From: Mark Hunte <email@hidden>)
 >Re: Scripting alerts (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: I search a script for itunes task tyvm!
  • Next by Date: Re: Xcode Yosemite 10.10.1 cocoa-Applescript iTunes Tell blocks not being called
  • Previous by thread: Re: Scripting alerts
  • Next by thread: Re: Xcode Yosemite 10.10.1 cocoa-Applescript iTunes Tell blocks not being called
  • Index(es):
    • Date
    • Thread