Results 1 to 5 of 5

Thread: How to display 'now playing' info in a screen saver?

  1. #1
    Constant Bitrate
    Join Date
    Jun 2005
    Location
    California
    Posts
    142

    How to display 'now playing' info in a screen saver?

    I'd like to be able to display now-playing info from iTunes or other apps in a screen saver. Any advice on how to do this?

  2. #2
    QCar Creator Jirka Jirout's Avatar
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    590
    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).


    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"];
    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...

  3. #3
    Constant Bitrate
    Join Date
    Jun 2005
    Location
    California
    Posts
    142
    Hopefully in an existing one. Thanks for the code, though. If I have to roll my own it'll come in handy.

  4. #4
    Low Bitrate
    Join Date
    Jul 2005
    Location
    Atlanta
    Posts
    68
    Have you tried using Quartz Composer? I'm not sure how it could interface with apps like iTunes, but it's really easy to make cool-looking screensavers regardless

  5. #5
    Constant Bitrate
    Join Date
    Jun 2005
    Location
    California
    Posts
    142

    Quartz Composer

    Quote Originally Posted by Mahalis
    Have you tried using Quartz Composer? I'm not sure how it could interface with apps like iTunes, but it's really easy to make cool-looking screensavers regardless
    Fa'a Mahalo, bra! That's a great tip. I found Engadget's article about making a screensaver via Google, based on your suggestion. HOW-TO: Make a customized RSS screensaver in Tiger

    For those as clueless as me, Quartz Composer is a part of Tiger (Mac OS X 10.4).

Similar Threads

  1. any feedback info. on Dynamix 7" VGA Touch Screen TFT ???
    By xtreamvette in forum LCD/Display
    Replies: 29
    Last Post: 04-22-2007, 03:19 PM
  2. Replies: 4
    Last Post: 01-29-2005, 06:35 PM
  3. Replies: 4
    Last Post: 10-04-2004, 01:00 AM
  4. new screen on ebay, any info?
    By hoodlum in forum LCD/Display
    Replies: 2
    Last Post: 09-17-2004, 05:22 PM
  5. X-MP3Pad: Beta testers needed... Please read!
    By PorscheMP3 in forum Software & Software Development
    Replies: 0
    Last Post: 08-22-2002, 11:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •