Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
OOMusicController(Private) Category Reference

Instance Methods

(void) - playiTunesPlaylist:
 
(void) - pauseiTunes
 

Detailed Description

Definition at line 35 of file OOMusicController.m.

Method Documentation

◆ pauseiTunes

- (void) pauseiTunes

Extends class OOMusicController.

Definition at line 32 of file OOMusicController.m.

374{
375 NSString *ootunesScriptString = [NSString stringWithFormat:@"try\nignoring application responses\ntell application \"iTunes\" to pause\nend ignoring\nend try"];
376 NSAppleScript *ootunesScript = [[NSAppleScript alloc] initWithSource:ootunesScriptString];
377 NSDictionary *errDict = nil;
378 [ootunesScript executeAndReturnError:&errDict];
379 if (errDict)
380 OOLog(@"sound.music.iTunesIntegration.failed", @"ootunes returned :%@", errDict);
381 [ootunesScript release];
382}
#define OOLog(class, format,...)
Definition OOLogging.h:88
return nil

◆ playiTunesPlaylist:

- (void) playiTunesPlaylist: (NSString *) playlistName

Extends class OOMusicController.

Definition at line 32 of file OOMusicController.m.

350 :(NSString *)playlistName
351{
352 NSString *ootunesScriptString =
353 [NSString stringWithFormat:
354 @"with timeout of 1 second\n"
355 " tell application \"iTunes\"\n"
356 " copy playlist \"%@\" to thePlaylist\n"
357 " if thePlaylist exists then\n"
358 " play some track of thePlaylist\n"
359 " end if\n"
360 " end tell\n"
361 "end timeout",
362 playlistName];
363
364 NSAppleScript *ootunesScript = [[[NSAppleScript alloc] initWithSource:ootunesScriptString] autorelease];
365 NSDictionary *errDict = nil;
366
367 [ootunesScript executeAndReturnError:&errDict];
368 if (errDict)
369 OOLog(@"sound.music.iTunesIntegration.failed", @"ootunes returned :%@", errDict);
370}

The documentation for this category was generated from the following file: