magician13134 Posted January 29, 2007 Share Posted January 29, 2007 (edited) Ok... I'm currently writing a program that interacts with iTunes or any other media player. I coded the iTunes part seperatly, so if iTunes is open it does the iTunes code, otherwise it does the generic code... However, when iTunes is closed, I get a fatal error: If $iTunes.PlayerState <> $state ThenAnd it says $iTunes isn't an object... I can understand that, iTunes is closed, so it's no longer an object, however, the part of code that's in looks like this: If IsObj($iTunes) Then If $iTunes.PlayerState <> $state Then If $iTunes.PlayerState = 1 Then GUICtrlSetImage($PlayPause, "bitmaps/pause.bmp") $state = $iTunes.PlayerState Else GUICtrlSetImage($PlayPause, "bitmaps/play.bmp") $state = $iTunes.PlayerState EndIf EndIf EndIf So it shouldn't even go into that loop if iTunes is closed... I get that error everytime.... any ideas? Edited January 29, 2007 by magician13134 Visit Magic Soft Inc. for some of my software Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted January 30, 2007 Moderators Share Posted January 30, 2007 You may want to take a look at my Absolute Lyrics Finder Script (see my signature), it integrates very well with both iTunes and Winamp. I thoroughly commented the source so it should be fairly easy to understand. Pay extra close attention to the event functions toward the bottom of the script as I believe this is were your problem is coming from. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now