???There are a few different methods for accomplishing this depending on the platform, but yes one way is to ???intelligently??? monitor the iTunes Library music file, and another would be to use the iTunes Control on Windows or ScriptingBridge in Cocoa, etc.