Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sdashiki

macrumors 68040
Original poster
Aug 11, 2005
3,529
11
Behind the lens
is it possible to get iTunes info into another application, and use that application to also control iTunes?

basically a front end for iTunes, that lists all the stuff and has all the functionality of iTunes itslef, but in a different layout.

Can you get the info from iTunes in real time and control it as well?

Looking to try to make a Front End for a touchscreen kind of interface....just new to coding and wanted to know if its possible, then look more into it.

thanks
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Sdashiki said:
those are scripts to run inside of iTunes.

What I want is a script that can control iTunes from another app.

No they are not. These scripts can be saved as stand alone "apps" from Script Editor. To control iTunes from another app you will have to send these commands to it via AppleScript/Apple Events.

The whole Tell application "iTunes" is a bit of a giveaway that they run from outside iTunes.

You could use the scripts as the basis for a simple AppleScript Studio app to control iTunes.

If you are using Cocoa then look at the NSAppleScript class to send the Applescript commands.
 

Sdashiki

macrumors 68040
Original poster
Aug 11, 2005
3,529
11
Behind the lens
thanks.

what about getting iTunes information to disply?

Like track times, playlists, etc etc.

I am looking to make a touchscreen interface for iTunes.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Sdashiki said:
thanks.

what about getting iTunes information to disply?

Like track times, playlists, etc etc.

I am looking to make a touchscreen interface for iTunes.

You can query this via AppleScript, but, speeking from experience, it's really slow. I'd use AppleScript for the control and to get the details of the current track (i.e. how long it's been playing) and parse the xml library file for the rest. Apple only creates this file for this purpose, it's not used for anything else. It takes some code I have lying around about 30 minutes to get all the track details from my 7000 song library via AppleScript! You could parse the xml in seconds...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.