Achilles Posted April 16, 2007 Posted April 16, 2007 just want to thank for your first script to get the trackname and artistIt does other stuff: .album, .time., .genre... Probably anything under the iTunes menu...@death Pax: Thanks, I'm trying to learn about objects and this is helpful... I was thinking of making a mini player for iTunes but decided it would be completely useless! My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
MyTech Posted March 13, 2009 Posted March 13, 2009 (edited) Itunes Current Song - Displayed in Skype MoodText CODE;Thanks to Greenmachine's original work ;I Added Skype Moodtext option ;Updated March 13, 2009 Global $oItunes $oSkype = ObjCreate("Skype4COM.Skype"); Added - Creates the skype object $CurrentSong = GetCurrentItunesSong() TrayTip ("Current Song", $CurrentSong, 1) $oSkype.CurrentUserProfile.MoodText = "Listening to: " & $CurrentSong; Added - Populate the MoodText with current song playing Do Sleep (1000) $NewSong = GetCurrentItunesSongAfterCreation() If $NewSong <> $CurrentSong Then $CurrentSong = $NewSong TrayTip ("Song Changed", $CurrentSong, 1) $oSkype.CurrentUserProfile.MoodText = "Listening to: " & $CurrentSong; Added - Populates the Moodtext with the new song playing EndIf Until Not ProcessExists ("iTunes.exe") Func GetCurrentItunesSongAfterCreation() Local $Title = "" $state=$oItunes.PlayerState If $State=1 Then $curtrack=$oItunes.CurrentTrack $Trackname=$curtrack.Name $Artistname=$curtrack.Artist $Title=$ArtistName & " - " & $TrackName EndIf Return $Title EndFunc Func GetCurrentItunesSong() Local $Title = "" $oItunes = ObjCreate("iTunes.Application") If @error Then Msgbox (0,"iTunes","Error Getting an active iTunes Object. Error code: " & Hex (@error, 8)) Exit EndIf $State=$oItunes.PlayerState If $State=1 Then $curtrack=$oItunes.CurrentTrack $Trackname=$curtrack.Name $Artistname=$curtrack.Artist $Title=$ArtistName & " - " & $TrackName EndIf Return $Title EndFunc Edited March 13, 2009 by VOIPER
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