- Save as
~/Library/iTunes/Scripts/show cover.scpt
- Run it from iTunes menu → weird unicode symbol I couldn't find → show cover
- Fail and get error message
- Allow iTunes to "control your computer" in macOS System Preferences → Security & Privacy → Privacy → Accessibility
- Try again
Created
December 6, 2017 10:56
-
-
Save deepsweet/877f30481091b9e1f68210b9d3fc408d to your computer and use it in GitHub Desktop.
Open fullscreen album cover of current track in iTunes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "iTunes" to tell artwork 1 of current track | |
set srcBytes to raw data | |
if format is «class PNG » then | |
set ext to ".png" | |
else if format is JPEG picture then | |
set ext to ".jpg" | |
end if | |
end tell | |
set fileName to (((path to temporary items from user domain) as text) & "cover" & ext) | |
--display dialog fileName | |
open for access file the fileName with write permission | |
write srcBytes to file the fileName starting at eof | |
close access file the fileName | |
tell application "Finder" | |
open fileName | |
tell application "System Events" to tell process "Preview" | |
repeat until window 1 exists | |
end repeat | |
set value of attribute "AXFullScreen" of window 1 to true | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment