Applescript to shutdown iTunes for fast user switching?

Posted:
in iPod + iTunes + AppleTV edited January 2014
I am curious to see if anybody knows or has written an Applescript that will shut down iTunes when you switch users in Panther. I don't want to alter anything to allow iTunes to play with both users, I just want something that will shut it down when switching users, in case I or my wife forget to prior to switching users...Any help is greatly appreciated.

Comments

  • Reply 1 of 10
    Quote:

    Originally posted by ijerry

    I am curious to see if anybody knows or has written an Applescript that will shut down iTunes when you switch users in Panther. I don't want to alter anything to allow iTunes to play with both users, I just want something that will shut it down when switching users, in case I or my wife forget to prior to switching users...Any help is greatly appreciated.



    Good idea. Too bad FUS makes you quit iTunes in order to use it with another user. It could cause all sorts of problems.
  • Reply 2 of 10
    ijerryijerry Posts: 615member
    okay, so with no responses on where to find such an applescript, and those that do have the ability to make one to be too busy, could anyone point me in the right direction to help myself? I have looked at example scripts, but none of them deal with user switching, and shutting down itunes...So, if you could get me close so that I can write the script I would appreciate that much...
  • Reply 3 of 10
    umm, fast user switching in Panther DOES stop iTunes playback for the current user, automatically. There's even a nice fade out of the music as the screen is rotating.



    natch...
  • Reply 4 of 10
    ijerryijerry Posts: 615member
    yes, but it does not shut it down...So when you switch users the new user is not able to open up itunes unless the other person quite itunes prior to the switch...So, I would like itunes to just be shut down rather than simply muted so that the next user can use all the apps, without having the prior user log back in to shut down itunes...Make sense??
  • Reply 5 of 10
    if you don't use the same music library folder as your wife it will work. iTunes only doesn't open if you have the same music library folder as someone else on the computer. Interesting problem...
  • Reply 6 of 10
    ijerryijerry Posts: 615member
    bizarre, I have all of my music on an external, and I imported all the songs for her account into her home account, so that is where her itunes is calling the files from, and it still gives me the error message...Any ideas on that?
  • Reply 7 of 10
    amorphamorph Posts: 7,112member
    The solution seems to be making iTunes able to simultaneously keep track of multiple states, and be in the middle of playing various MP3s. Some of this should be as simple as keeping preference and state files in each user's home directory (which, of course, iTunes already does to a great degree). It might be necessary to wait for QuickTime 7, which will be reentrant - meaning that Bob's iTunes Thread can tell QT to play an MP3, and before it's done, Jane's iTunes Thread can call the same function without waiting for Bob's to finish, or interfering. It depends on how pausing/stopping is implemented in the fast user switch.



    I don't do QT programming, so I don't know the answer to that. It could be a feature for iTunes 5, though. In fact, it'll be interesting to see just how many applications will have to be updated to work sensibly with FUS. That's a fundamental paradigm shift in the way Mac applications expect to be used.
  • Reply 8 of 10
    ijerryijerry Posts: 615member
    Thanks for that info...It makes a lot of sense, and I hope that Apple addresses the issue with a subsequent update, because it is really a pain for my wife and I...Perhaps if we weren't so forgetful, and didn't both live off of iTunes, it would be okay. In the meantime, I am going to keep trying to find a way to write an Applescript to shut it down...
  • Reply 9 of 10
    Quote:

    Originally posted by yomofo

    if you don't use the same music library folder as your wife it will work. iTunes only doesn't open if you have the same music library folder as someone else on the computer. Interesting problem...



    That's not true. I just tried it for a newly created user and it said that iTunes is in use by another user, ask that user to quit, blah blah. It's a real problem and one that will perplex new users because other applications don't act that way.
  • Reply 10 of 10
    Quote:

    Originally posted by ijerry

    Thanks for that info...It makes a lot of sense, and I hope that Apple addresses the issue with a subsequent update, because it is really a pain for my wife and I...Perhaps if we weren't so forgetful, and didn't both live off of iTunes, it would be okay. In the meantime, I am going to keep trying to find a way to write an Applescript to shut it down...



    I'd post over on macnn.com's boards and see if Sal (the resident applescript guru) can come up with something.
Sign In or Register to comment.