X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/e71ed519cabc08fdd4fb1d7e5f7330a581e3a3b2..f8b15427731ec2d8b6374baa51f5d133a209121e:/iTunesRemote.m diff --git a/iTunesRemote.m b/iTunesRemote.m index c0a16a5..412b5e5 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -72,13 +72,11 @@ - (BOOL)showPrimaryInterface { // Make this into AppleEvents... shouldn't be too hard, I'm just too tired to do it right now. - //tell application "iTunes" - // set frontmost to true + [[ITAppleEventCenter sharedCenter] sendAEWithSendString:[NSString stringWithFormat:@"data:long(%lu), '----':obj { form:'prop', want:type('prop'), seld:type('pisf'), from:'null'() }",YES] eventClass:@"core" eventID:@"setd" appPSN:iTunesPSN]; + // Still have to convert these to AEs: // set visible of browser window 1 to true // set minimized of browser window 1 to false // set view of browser window 1 to (playlist (index of current playlist)) - //end tell - //Someone do this plz kthx return NO; } @@ -168,7 +166,7 @@ - (NSString *)currentSongUniqueIdentifier { - return @"BBQ"; + return [NSString stringWithFormat:@"%i-%i", [self currentPlaylistIndex], [[ITAppleEventCenter sharedCenter] sendTwoTierAEWithRequestedKeyForNumber:@"pDID" fromObjectByKey:@"pTrk" eventClass:@"core" eventID:@"getd" appPSN:iTunesPSN]]; } - (int)currentSongIndex @@ -225,8 +223,9 @@ - (BOOL)equalizerEnabled { - return [[ITAppleEventCenter sharedCenter] - sendAEWithRequestedKeyForNumber:@"pEQ " eventClass:@"core" eventID:@"getd" appPSN:iTunesPSN]; + int thingy = [[ITAppleEventCenter sharedCenter] sendAEWithSendStringForNumber:@"'----':obj { form:type('prop'), want:type('prop'), seld:type('pEQ '), from:() }" eventClass:@"core" eventID:@"getd" appPSN:iTunesPSN]; + NSLog(@"%i", thingy); + return thingy; } - (BOOL)setEqualizerEnabled:(BOOL)enabled