THESE FORUMS NOW CLOSED (read only)

  • 29 Mar 2024, 01:14
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: iTunes and Applescript  (Read 6432 times)

Akima

  • WoW gold miner on break
  • *****
  • Offline Offline
  • Posts: 6,523
  • ** 妇女能顶半边天 **
iTunes and Applescript
« on: 01 Feb 2010, 17:26 »

I hope I'm not posting something everyone already knows (a forum search suggests not), but I've just discovered scripting to automate tasks in iTunes. I'm experimenting with my own scripts, but there are heaps of pre-written scripts available to do many routine tasks here:

http://dougscripts.com/itunes/
Logged
"I would rather have questions that can't be answered, than answers that can't be questioned." Richard Feynman

Tom

  • Older than Moses
  • *****
  • Offline Offline
  • Posts: 4,037
  • 8==D(_(_(
Re: iTunes and Applescript
« Reply #1 on: 01 Feb 2010, 18:42 »

For those of us who aren't technologically-inclined, care to explain?
Logged

Akima

  • WoW gold miner on break
  • *****
  • Offline Offline
  • Posts: 6,523
  • ** 妇女能顶半边天 **
Re: iTunes and Applescript
« Reply #2 on: 01 Feb 2010, 19:34 »

Every Apple computer (or at least copy of OS/X) comes with a built-in programming language called Applescript. So called "scripting languages" are a feature of many operating systems, and intended to automate routine system tasks. In Microsoft-world, they are traditionally called "batch files". Typically, things that a computer user can do manually, such as copying, moving, renaming files etc. can be automated with scripts.

In an iTunes context, Applescript can be used to automate many "music collection management" tasks. For example, when I download music as .wav files from Magnatune and import them into iTunes, each track is typically given a name that includes track number, track title, and artist name, something like this:

01-Some Track Title-Some Band Name

Classical tracks can be more complex, including BWV numbers for J.S.Bach, for example. In the absence of a script, one would have to select the track or tracks in iTunes, press ⌘I to display the track info, and edit the fields manually to put the track number, band name etc. in the correct fields, before removing the surplus info from the track name. This is not a big deal for one, or even a few tracks, but Trevor Pinnock's Les Cyclopes, for example, has twenty-two tracks. Suitable scripts can automate the whole procedure, parsing the track name, extracting the relevant parts and writing them to the correct fields, cleaning up the track name, and so on. Select all the tracks in an album, run the scripts, and you're done.

Disclaimer: I work in the computer industry, so what seems cool and easy to me could appear arcane and pointless to muggles, but I hope this explains a bit better.
Logged
"I would rather have questions that can't be answered, than answers that can't be questioned." Richard Feynman

Dimmukane

  • Vulcan 3-D Chess Master
  • *****
  • Offline Offline
  • Posts: 3,683
  • juicer
Re: iTunes and Applescript
« Reply #3 on: 01 Feb 2010, 20:01 »

It may be arcane, but it's certainly not pointless.  Doing all that stuff by hand is a pain.  Do you know if there is a Windows alternative for this?
Logged
Quote from: Johnny C
all clothes reflect identity constructs, destroy these constructs by shedding your clothes and sending pictures of the process to the e-mail address linked under my avatar

Akima

  • WoW gold miner on break
  • *****
  • Offline Offline
  • Posts: 6,523
  • ** 妇女能顶半边天 **
Re: iTunes and Applescript
« Reply #4 on: 01 Feb 2010, 21:18 »

It's been a long time since I worked with Windows (and I'm finally out of therapy :laugh:), but Apple Developer Connection offers an iTunes For Windows COM SDK* so it must be possible to do something. A little google-fu reveals these links, for example. You might have a look, but I can't test, recommend, or support any of it. You're on your own, pilgrim!

* Now you guys know what it's like for me when you talk about guitars, pedals and amps....  :laugh:
Logged
"I would rather have questions that can't be answered, than answers that can't be questioned." Richard Feynman

Inlander

  • coprophage
  • *****
  • Offline Offline
  • Posts: 7,152
  • Hug your local saintly donkey.
    • Instant Life Substitute
Re: iTunes and Applescript
« Reply #5 on: 01 Feb 2010, 21:30 »

God don't mention that you'll just get them started again.

P.S. who is that in your av?
Logged

Be My Head

  • Psychopath in a hockey mask
  • ****
  • Offline Offline
  • Posts: 627
Re: iTunes and Applescript
« Reply #6 on: 01 Feb 2010, 21:46 »

Before anyone gets into an argument about Operating Systems; I just want to say I use Arch Linux, so I beat you all in nerd points. Unless someone here uses Gentoo.
Logged

JD

  • coprophage
  • *****
  • Offline Offline
  • Posts: 7,803
  • The Phallussar
Re: iTunes and Applescript
« Reply #7 on: 01 Feb 2010, 22:21 »

I use my mind
Logged
Quote from: Jimmy the Squid
Hey JD, I really like your penis, man.

Mein Tumblr

Tom

  • Older than Moses
  • *****
  • Offline Offline
  • Posts: 4,037
  • 8==D(_(_(
Re: iTunes and Applescript
« Reply #8 on: 01 Feb 2010, 23:06 »

Thx Akima (got an actual name I can use?), things like these I need explained in English. This is somewhat interesting to me as I will be getting a shiny new macbook pro in the mail soon.
Logged

Akima

  • WoW gold miner on break
  • *****
  • Offline Offline
  • Posts: 6,523
  • ** 妇女能顶半边天 **
Re: iTunes and Applescript
« Reply #9 on: 02 Feb 2010, 01:01 »

P.S. who is that in your av?
No idea. I clipped the avatar from a drawing I found on Deviant Art titled something like "Guess Who?". I think it might have been intended to be 章子怡 (Zhang Ziyi), but I'm not sure. Edit: I've changed my avatar since I posted this.

Thx Akima (got an actual name I can use?), things like these I need explained in English. This is somewhat interesting to me as I will be getting a shiny new macbook pro in the mail soon.
Akima is a name! :-D  Enjoy your MacBook Pro. It's a nice piece of kit.

Before anyone gets into an argument about Operating Systems; I just want to say I use Arch Linux, so I beat you all in nerd points. Unless someone here uses Gentoo.
Ugh! I wrestle with Solaris and several flavours/descendants of BSD Unix for a living. I do not want to come home to Linux. Besides, I recompiled my home Unix apps on Darwin so I could run them on my iMac and shut down my old SPARCstation 20* home box. Nerdy enough for ya? :-P

* Bought used on e-Bay; I'm not that old...
« Last Edit: 08 Jul 2010, 18:00 by Akima »
Logged
"I would rather have questions that can't be answered, than answers that can't be questioned." Richard Feynman

Be My Head

  • Psychopath in a hockey mask
  • ****
  • Offline Offline
  • Posts: 627
Re: iTunes and Applescript
« Reply #10 on: 02 Feb 2010, 07:21 »

Ugh! I wrestle with Solaris and several flavours/descendants of BSD Unix for a living. I do not want to come home to Linux. Besides, I recompiled my home Unix apps on Darwin so I could run them on my iMac and shut down my old SPARCstation 20* home box. Nerdy enough for ya? :-P

* Bought used on e-Bay; I'm not that old...

*shrugs*, I can't see why anyone would choose to use an Apple product over all of the other *nix OS' if they have the knowledge of how to use one. However I've never owned an Apple product. Is it possible to install a third party window manager on any of their products? Or customize everything right down to the kernel? That's why I love Arch so much. Customization. You get a shell (literally) and build it from there.

/thread de-rail
« Last Edit: 02 Feb 2010, 07:24 by Be My Head »
Logged
Pages: [1]   Go Up