Re: get lyrics from Music app
Re: get lyrics from Music app
- Subject: Re: get lyrics from Music app
- From: Axel Lüttgens via AppleScript-Users <email@hidden>
- Date: Mon, 7 Nov 2022 14:39:32 +0100
- Ironport-data: A9a23:uJi5iaMsBA2nMZ3vrR3xlsFynXyQoLVcMsEvi/4bfWQNrUpxhjYCm GIcC2/TPfjcNmD1KdB0YIuzoRhV6JTWztJnHnM5pCpnJ55oRWopJjg4wmPYZX76whjrFRo/h ykmQoCcappyFxcwnz/1WpD5t35wyKqUcbT1De/AK0hZSBRtIMsboUsLd9UR38g537BVPyvX4 Ymo+pSHZwf/s9JJGjt8B5yr+UsHUMva5WtwUmwWPZhjoFLYnn8JO5MTTYnZw6zQG9Q88kaSH o4v/Znhlo/r105F5uCNzt4XRnY3rov6ZmBivJb5t5+K2XCurgRqukoy2WF1hU1/011llPgpo DlBWADZpQoBZsXxdOohvxZwAn1xH4Qeou/7Bn2jqMfK7XzZfyLQ6qA7ZK02FdVwFudfGmRS7 fccKT0LclaKn/qyzdpXSME834J5cJStZ9pZ4yg/pd3aJa9OrZTrSrXH4ZlcwSssic1IBt7FZ NsfZCYpZhmojxhnYwpIVcJuxbz07pX5W2JVmleEi6lr2Eja01Z6j6biL4Tbd9PfEK25mW7d/ Aoq5V/RCwkCMNGEwiCE6m7pm/TChzjTXIMJCKb+/+ZyhFDVzWsWYCD6TnPi+Kb/0Rf7AY4Cb hxNvCMitqx3+F2tCNjmR1uyrXqLtxUbXpxaHoXW9T2w90Yd2C7BbkBsc9KLQIZOWBMeLdDh6 rNFcx4Fy9CiXH15hE9xLoupkA4=
- Ironport-hdrordr: A9a23:jx8Ttawsa0atMUAUWQYAKrPwB71zdoMgy1knxilNoHtuA7elfq GV7YwmPHrP41wssR4b+OxoR5PwOE80maQU3WBpB8bHYOC+ghrOEGgA1/qB/9SDIUPDH4dmvM 8MT0EZMqySMbEQt6nHCWeDf+oI8Z2i2oiNvKP/4h5WPGdXglZbnmJENjo=
- Ironport-phdr: A9a23:C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Y+Uffqh0OYUT5IfHuyW6M85ionCIK9F4vMXJitgKSF3CilBJFZemdGClXfW UvvIoyfRr9YYTqKJsJ6mSYFTaTkVpQszwqGsA7h16EhJ/LM/iBevpXmgotb/erWwDgi+DhDK 1CBz26ASXo8ymoYSjtw2L1jvUNwzEyryqtphfFEU9ZesaAaGjwmPILRmrQpQ+v5XRjMK4/hd Q==
> Le 6 nov. 2022 à 16:37, Jim Weisbin a écrit :
>
> I believe this used to work in iTunes, but doesn’t seem to work in Music app
>
> tell application "Music"
> set sel to selection
>
> repeat with this_track in sel
> set the_lyrics to this_track's lyrics
> set {art, alb, nom} to {this_track's artist, this_track's
> album, this_track's name}
>
> display dialog the_lyrics
>
> end repeat
> end tell
>
> I would like to extract the lyrics, which I know are present for the selected
> track, but I’m just getting an empty string.
Hello Jim,
Your script works fine here under Monterey 12.6 (Music 1.2.5.7) when run in
Script Editor.
As does this simplified version as well:
tell application "Music"
set {lyr, art, alb, nom} to {lyrics, artist, album, name} of
first item of selection
end tell
display dialog lyr
HTH,
Axel
_______________________________________________
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