Do you mean in your own screensaver or an existing one? In your own screensaver (if written in Cocoa), you can use following code to get info from iTunes (result is a dictionary with current time and names of the track and playlist).
If you want to display some info over an existing screensaver, check the NSWindow documentation in Cocoa reference. I have not tried it, but it appears that a window in NSScreenSaverWindowLeven might allow you to display something above the screensaver...Code:NSMutableDictionary *moduleSetup = [NSMutableDictionary dictionary]; NSAppleScript *asExecutor; NSAppleEventDescriptor *asResult; asExecutor = [[[NSAppleScript alloc] initWithSource:@"tell app \"iTunes\" to get {player position, index of current track, index of current playlist}"] autorelease]; asResult = [asExecutor executeAndReturnError:nil]; [moduleSetup setObject: [NSNumber numberWithInt:[[asResult descriptorAtIndex:1]int32Value]] forKey:@"CURR_TIME"]; [moduleSetup setObject: [NSNumber numberWithInt:[[asResult descriptorAtIndex:2]int32Value]] forKey:@"CURR_TRACK"]; [moduleSetup setObject: [NSNumber numberWithInt:[[asResult descriptorAtIndex:3]int32Value]] forKey:@"CURR_PLIST"];



LinkBack URL
About LinkBacks
Reply With Quote




Bookmarks