• 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
display as text anomaly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

display as text anomaly


  • Subject: display as text anomaly
  • From: Paul Scott <email@hidden>
  • Date: Sat, 29 Apr 2017 15:34:53 -0700
  • Dkim-filter: OpenDKIM Filter v2.11.0 secure.paul-scott.us 3E556403F5

I’ve got an AppleScript that prints the media kind and video kind correctly when run from ScriptEditor:

media kind : TV show
video kind : TV show

but prints this gibberish when run from iTunes:

media kind : «constant ****kVdT»
video kind : «constant ****kVdT»

What am I doing wrong?

tell application "iTunes"
if selection is not {} then
set sel to selection
repeat with i from 1 to count items of sel
set aTr to item i of sel
set AppleScript's text item delimiters to {"."}
set v to (get first text item of (version as text)) & "." & (get second text item of (version as text))
if v as real ≥ 7.0 then
tell aTr
display dialog ¬
"name : " & name & return & ¬
"media kind : " & (media kind as string) & return & ¬
"video kind : " & (video kind as string) & return & ¬
""
end tell
end if
end repeat
else
display dialog "No tracks selected" buttons {"Cancel"} default button 1 with icon 2 giving up after 15
end if
end tell

TIA,

--
Paul Scott

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: display as text anomaly
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Copying the path of files selected in Finder
  • Next by Date: Re: Copying the path of files selected in Finder
  • Previous by thread: Re: Copying the path of files selected in Finder
  • Next by thread: Re: display as text anomaly
  • Index(es):
    • Date
    • Thread