Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Hide/show the iTunes Store in iTunes Apps
For infrequent users of the iTunes Store, here is an AppleScript to enable and visit the Store within iTunes, then leave and disable it.

First, go into the System Preferences » Universal Access prefpane and check 'Enable access for assistive devices.'

Then you can download this script and save it to ~/Library/Scripts/Applications/iTunes. This will place it in the Script menu when iTunes is active. You may need to create the iTunes subfolder. You can also assign a keyboard shortcut to the script using Spark [crarko adds: link fixed] or some similar program (not Quicksilver, I don't think it remembers persistent values across uses). This would make the command available even if you don't have iTunes currently open.

The script will enable the iTunes Store in the sidebar of iTunes (launching iTunes if necessary) if disabled, and load the Store. On the next use it will leave the Store, disable it and try to put the iTunes windows back the way they were before.

Unfortunately, disabling the Store closes all extra playlist windows -- I've included a warning dialog if this is undesirable. Leave the padlock open in the Parental Control section of iTunes preferences to avoid entering your password every time -- or don't, and have more secure access to the Store.

The script can be run from AppleScript Editor, logging any errors in the process. I tested this with iTunes 10 on 10.6.4. I don't use Ping or Genius among others, so unforeseen errors could arise. I quite like the cosmetic changes in iTunes 10 (my gramophone icon survived). This is my contribution to the minimalism.

[crarko adds: I tested this, and it works as described. The script download is mirrored here.]
    •    
  • Currently 2.15 / 5
  You rated: 2 / 5 (13 votes cast)
 
[7,690 views]  

Hide/show the iTunes Store in iTunes | 15 comments | Create New Account
Click here to return to the 'Hide/show the iTunes Store in iTunes' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Hide/show the iTunes Store in iTunes
Authored by: kirkmc on Sep 10, '10 08:32:34AM

Or you could do this:

http://www.mcelhearn.com/2010/09/07/itunes-tip-hide-the-itunes-store-and-ping/

---
Read my blog: Kirkville -- http://www.mcelhearn.com
Musings, Opinion and Miscellanea, on Macs, iPods and more



[ Reply to This | # ]
Hide/show the iTunes Store in iTunes
Authored by: philostein on Sep 10, '10 08:40:16AM

It already does do this.



[ Reply to This | # ]
Hide/show the iTunes Store in iTunes
Authored by: Sesquipedalian on Sep 10, '10 01:24:26PM
You are wrong about Quicksilver. Keyboard shortcuts made with it work perfectly well across restarts for me. If you need help with it, stop by http://groups.google.com/group/blacktree-quicksilver to ask other users for assistance.

[ Reply to This | # ]
Hide/show the iTunes Store in iTunes
Authored by: philostein on Sep 10, '10 03:28:01PM

You misunderstand me (I think). The script does run across restarts of Quicksilver, but, for me, QS never remembers the contents of the global variables in the script (whether QS is restarted or not).

However, I would love for this to work, so I'll drop a post at the group.



[ Reply to This | # ]
Hide/show the iTunes Store in iTunes
Authored by: Sesquipedalian on Sep 11, '10 09:17:15AM
I did misunderstand you. However, the script works exactly the same when run via Quicksilver as it does when run via any other method I have tried. It does define some variables that would be persistent, but nothing that persists does anything that matters.

Also, since this uses GUI scripting, the best general practice would be not to remember any values across executions, since the user may change something unexpected between executions.

[ Reply to This | # ]

Hide/show the iTunes Store in iTunes
Authored by: philostein on Sep 11, '10 10:35:44AM

Regarding GUI scripting, I agree it's not an ideal way to handle functions. But as the script checks if it's in the Store when run, and re-initializes the variables if not, I doubt much harm will come of any errors. It is possible, for example, to run the script, close the Store manually, change a bunch of windows, re-open the Store and then run the script again and have unexpected results - but I say that would be counter-intuitive.

When run from outside the Store, the persistent variables in the script remember which window was frontmost and whether the 'iTunes' window was minimized or not. Quicksilver doesn't remember these variables between uses of the script, whereas Spark does.

For example, have a video window frontmost in iTunes, run the script twice, and have the video frontmost again. Quicksilver (and iTunes) won't do this. (I know - it's not a big deal, but it bugs me!)

Update - I just saw your Quicksilver forum reply. QS runs the code instead of the script, so it won't remember any variables. Thanks! That's been bugging me for a while.

So, if anyone can come up with a better way to use and hide the Store (including Ping) without GUI scripting or the 10-step manual method, you know what to do…



[ Reply to This | # ]
Hide/show the iTunes Store in iTunes
Authored by: Sesquipedalian on Sep 11, '10 01:02:30PM

Well, I've tried several different ways of running the script while trying with your video clip example, and they all produce the same result. If the Store is enabled and a video is playing in a separate, front window, by the time the script is done, the video is still at the front. If the Store is disabled while the video is playing, the video ends up behind the main iTunes window. I tried to see if there was something special about the Spark app that you linked to, but that appears to a note-and-task manager, so I'm not sure how you were using it to do this.



[ Reply to This | # ]
Hide/show the iTunes Store in iTunes
Authored by: philostein on Sep 11, '10 06:51:21PM
Ha ha - nice one! Craig linked to a different Spark. The correct one is here.

Craig, could you change the original link? :D

For me, the script brings the Store window forward when opening/enabling the Store, and the video window forward when closing/disabling the Store. Your summary sounds like the complete opposite, which is puzzling. Anyone else find this?

[ Reply to This | # ]
Hide/show the iTunes Store in iTunes
Authored by: crarko on Sep 11, '10 08:05:29PM

Link fixed. :)



[ Reply to This | # ]
plutil one-liner
Authored by: ghrossman on Sep 11, '10 04:07:18PM
another way to do it is to run this command, either from the Terminal or as an Automator service
defaults write com.apple.iTunes disableMusicStore -bool TRUE


[ Reply to This | # ]
plutil one-liner
Authored by: Sesquipedalian on Sep 11, '10 04:14:07PM

Just make sure to restart iTunes afterwards.



[ Reply to This | # ]
plutil one-liner
Authored by: philostein on Sep 11, '10 06:49:11PM

Thanks ghrossman.

It would be difficult to integrate this into a Store opening script, as it would require restarting iTunes and therefore losing all the open video and artwork viewer windows.



[ Reply to This | # ]
plutil one-liner
Authored by: ghrossman on Sep 11, '10 09:25:39PM

good point. on the other hand i found that i can turn the store back on without restarting itunes by just clicking on an "itpc://" link in my web browser. in practice this means i'll browse the web version of the itunes store and if i see something i like i can click the "View in iTunes" link, which will reveal the store in iTunes.app. then when i'm done shopping i run the service again so that the next time i run itunes the store is hidden.
not necessarily for everybody but so far this works for me.



[ Reply to This | # ]
plutil one-liner
Authored by: philostein on Sep 14, '10 05:05:59AM

Hey, I like the web interface you mentioned. It's a lot cleaner and easier to navigate than the Store. (I sometimes feel like I'm wandering around The Nine Circles of Hell in there.)



[ Reply to This | # ]
Hide/show the iTunes Store in iTunes
Authored by: philostein on Sep 19, '12 05:14:26AM

I updated the script to work in the latest version of iTunes. There were a couple of small changes to UI elements' positions in iTunes' preferences window. My link links to the ML version, the mirror links to the old one.

Edited on Sep 19, '12 05:17:00AM by philostein



[ Reply to This | # ]