torels Posted December 9, 2008 Author Share Posted December 9, 2008 OK but I still don't get what you want to do... Do you want to navigate with the KeyBoard in the iTunes window? Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
lunkan Posted December 9, 2008 Share Posted December 9, 2008 no I want to navigete with a script in iTunes window and rhen select an album with a script. I had no problems with play/pause and next song, that is doable for me. Link to comment Share on other sites More sharing options...
lunkan Posted December 9, 2008 Share Posted December 9, 2008 (edited) Im using homeseer for steering la ot of things and also want to navigate thru iTunes and select albums. Im going to use HSTouch with autoit scripts for this if possible. Tried vith next song to see if the idea works and it does. Edited December 9, 2008 by lunkan Link to comment Share on other sites More sharing options...
Function Posted January 16, 2009 Share Posted January 16, 2009 I thought this thread would have had a million replies by now because of how useful this script is, but when I realized it's only two pages, I figured it's time to praise you, torels for making this script. I've been using it for a long time to delete songs from my iTunes. It's been a boon to my life. ThanksI'm also looking for a way to set the album art for my whole library. I was thinking of downloading it with Album Art Downloader because it has a command line interface and then setting it with this script. Does anyone know how I would go about automating this process? Link to comment Share on other sites More sharing options...
Function Posted January 17, 2009 Share Posted January 17, 2009 How can I test to see if a song has artwork associated with it? I want to make a playlist of the songs that don't have album artwork Link to comment Share on other sites More sharing options...
torels Posted January 17, 2009 Author Share Posted January 17, 2009 here is a way to do it#include <iTunes.au3> _iTunes_Start() $f = _iTunes_Current_ArtworkSaveToTmp() If FileExists($f) And FileGetSize($f)>0 Then MsgBox(0,"","Yes. Artwork exists") Else MsgBox(0,"","Nope. No artwork for this song!") EndFunc FileDelete($f) Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
senthor Posted January 19, 2009 Share Posted January 19, 2009 (edited) Small example... It connects iTunes with the windows media keys on keyboard and wmc remote. expandcollapse popup#NoTrayIcon #RequireAdmin global $HKstate = false Global $iTunesApp Global $Library_Tracks Global $file Global $path _iTunes_Start() HotKeySet("{MEDIA_STOP}", "SwitchHK") SwitchHK() While 1 Sleep(100) WEnd Func SwitchHK() If _IsPressed(23) then Exit If not $HKstate Then HotKeySet("{MEDIA_NEXT}", "_iTunes_Next") HotKeySet("{MEDIA_PREV}", "_iTunes_Prev") HotKeySet("{MEDIA_PLAY_PAUSE}", "_iTunes_Play_Pause") HotKeySet("{VOLUME_DOWN}", "_iTunes_Vol_Down") HotKeySet("{VOLUME_UP}", "_iTunes_Vol_Up") $HKstate = true ElseIf $HKstate Then HotKeySet("{MEDIA_NEXT}") HotKeySet("{MEDIA_PREV}") HotKeySet("{MEDIA_PLAY_PAUSE}") HotKeySet("{VOLUME_DOWN}") HotKeySet("{VOLUME_UP}") $HKstate = false EndIf return $HKstate EndFunc Func _iTunes_Start() $iTunesApp = ObjCreate("iTunes.Application") $Library_Playlist = $iTunesApp.LibraryPlaylist $Library_Tracks = $iTunesApp.LibraryPlaylist.Tracks $sel_Track = $iTunesApp.SelectedTracks $current_Track = $iTunesApp.CurrentTrack $Player_State = $iTunesApp.PlayerState $Playlist_Handle = $iTunesApp.LibrarySource.Playlists EndFunc ;==>_iTunes_Start Func _iTunes_Vol_Up($vol_percent = 1) $iTunesApp.SoundVolume = $iTunesApp.SoundVolume + $vol_percent EndFunc ;==>_iTunes_Vol_Up Func _iTunes_Vol_Down($vol_percent = 1) $iTunesApp.SoundVolume = $iTunesApp.SoundVolume - $vol_percent EndFunc ;==>_iTunes_Vol_Down Func _iTunes_Prev() $iTunesApp.PreviousTrack EndFunc ;==>_iTunes_Prev Func _iTunes_Next() $iTunesApp.NextTrack EndFunc ;==>_iTunes_Next Func _iTunes_Play_Pause() $iTunesApp.PlayPause EndFunc ;==>_iTunes_Play_Pause Func _IsPressed($sHexKey, $vDLL = 'user32.dll') ; $hexKey must be the value of one of the keys. ; _Is_Key_Pressed will return 0 if the key is not pressed, 1 if it is. Local $a_R = DllCall($vDLL, "int", "GetAsyncKeyState", "int", '0x' & $sHexKey) If Not @error And BitAND($a_R[0], 0x8000) = 0x8000 Then Return 1 Return 0 EndFunc ;==>_IsPressed Just press the play/pause, next, previous oder vol up/down buttons to sww how it works. With the stop-button you can de/activate the tool, when you press "End" and stop it will be closed. senthor Edited January 19, 2009 by senthor FileListToArray UDFMy tools Link to comment Share on other sites More sharing options...
torels Posted January 20, 2009 Author Share Posted January 20, 2009 If i were you i'd change the value of $volPercent to something around 10. So you get to rise or low copletely the volume in 10 steps...as it is now it will take you 100 click sto take the volume up completely! and 2 important things 1) you need no _isPressed function 2) just include the library... when you get to compile your script the functions get added automatically anyway good example! Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
TheSaint Posted March 16, 2009 Share Posted March 16, 2009 @torels - are there any commands for adding playlists to the Ipod itself (not just Itunes), and are you considering adding them ... including updating/combining/addingto/editing for playlists, etc? Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
torels Posted March 19, 2009 Author Share Posted March 19, 2009 no... everything that goes on an iPod has to pass from iTunes before... unfortunately but you could add anything you need to your library, update the iPod, and change back the library... even if I don't get the point in doing it just add the files to the library Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
TheSaint Posted March 19, 2009 Share Posted March 19, 2009 no... everything that goes on an iPod has to pass from iTunes before... unfortunately but you could add anything you need to your library, update the iPod, and change back the library... even if I don't get the point in doing it just add the files to the library Thanks for responding!The point is, that I have several thousand songs on my Ipod, and next to none in Itunes, as I don't store all my music on my PC (all on CD's or backed up to DVD), and I don't use bloated Itunes to play my music when I do ... either I use Winamp, foobar2000 or CDRun2 (my kids use Media Player).So Itunes doesn't like to do business that way, it demands that you have the tracks in it's normal database first, before you can place them on the Ipod.Once they are on the Ipod, it no longer cares, unless you do a sync ... which then matches both databases ... this is where thousands of users have lost their songs ... the match only works one way ... Itunes never imports stuff unless you tell it to, and only then if it's purchased items and it's been validated for them.This whole scenario, is why many people the world over hate or dislike Itunes (& Apple), and so use or keep trying to find an Itunes replacement (amongst other reasons).I've now settled pretty much on using foobar2000 to get my music onto the Ipod, but it is far from perfect at this stage in the Ipod Manager development (though I'm about to test a beta). Getting playlists and tracks onto the Ipod is almost a breeze (sorting of tracks issue aside), it is certainly the best method I've come across so far (Floola was a bit basic and slow in this area). Unfortunately, adding tracks to an existing playlist at this time, is not possible without going through some clunky steps, which I'll list below for those who are interested (hope you don't mind). Thankfully it does recognise when a song in a new playlist already exists on the Ipod, and so doesn't duplicate the file, but keeps the links intact & updated.I apologize in advance for lack of exact detail in the following procedure, as it was all done from memory ... access to the original PC being unavailable at the time. Anyone who wants greater clarity, can PM me or request that here, and I'll start another topic maybe ... being unfair to usurp torels topic any further.Steps To Update An Existing Playlist On Your Ipod Using foobar20001. Select Ipod Devices from the second dropdown menu.2. Select the playlist you want to update - it should appear in the left column as IpodView (this relies on the columns addon and your settings), and the existing tracks should be displayed in the main pane of foobar.3. Drag your new tracks (or a playlist of) to this main pane, and then drag them into position.4. You then need to delete the playlist from the Ipod, using another menu option on first dropdown menu (note that only the playlist is deleted, not the tracks).5. Rename IpodView to the original name of the playlist.6. Select the usual menu option to Send Playlists to the Ipod, then select your renamed playlist. Note, that only the non-existing tracks are copied to the Ipod.7. Reload the Ipod database.Order of Steps 3 & 4 doesn't matter, and if your playlist from Step 3 still contains all the files already on the Ipod, then you can skip Steps 1, 2 3 & 5, and just drag that playlist to the left column, then do Steps 4, 6 & 7.@torels - sorry about all that detail, but maybe it gives you some insight into a need for some more Itunes functions. In fact, I've downloaded the Itunes SDK, and spent many hours yesterday researching and discovering programs and scripts in VBScript & Javascript, that do command-line like operations with Itunes. I may come up with something myself eventually, but you might like to beat me to it ... or even foobar2000 might. Im also looking into the foobar2000 command-line options, but I don't think they work with menu items created by the Ipod Manager addon. Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
reyas Posted March 23, 2009 Share Posted March 23, 2009 hey guys. can anyone of you tell me how to play a song which i searched with the itunes udf sry my english is not very good ^^. Link to comment Share on other sites More sharing options...
torels Posted March 24, 2009 Author Share Posted March 24, 2009 this should work _itunes_PlaySearched($songtitle) local $return $sResults = $Library_Playlist.search($songtitle,0) for $track in $sResults _ArrayAdd($return,$track) Next Return $return EndFunc btw... I'm going to update the udf soon... It's quite limited as it is now @TheSaint I took a look at the COM object chm... I don't think it's possible without adding things to itunes first but I'll take a better look and possibly try and find a way of doing it thanks for the support everyone!!! Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
reyas Posted March 24, 2009 Share Posted March 24, 2009 hmm doesnt work for me. dunno know why :/ the return of the function is empty and the song isnt played. Link to comment Share on other sites More sharing options...
torels Posted March 25, 2009 Author Share Posted March 25, 2009 ok... I don't know how it works then... it was just a suggestion XD anyway... as soon as I have some time I will update the UDF you try playing a bit with it for the moment Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
colafrysen Posted August 5, 2009 Share Posted August 5, 2009 Hi Torels, first, thanks for this great UDF >_< But i cant seem to find the UnLoad function in the UDF. it's mentioned in the user calltip entries. Where is it?? PS the U is capitalized _iTUnes_Visuals_Enable() - Wrong _iTunes_Visuals_Disable() - Right [font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size] Link to comment Share on other sites More sharing options...
DJKMan Posted August 8, 2009 Share Posted August 8, 2009 When I try to run it this shows up whenever I do any command. =>Variable must be of type "Object".: $iTunesApp.VisualsEnabled = 1 $iTunesApp^ ERROR Link to comment Share on other sites More sharing options...
colafrysen Posted August 8, 2009 Share Posted August 8, 2009 Make sure that you call _iTunes_Start() to create the object. [font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size] Link to comment Share on other sites More sharing options...
DJKMan Posted August 9, 2009 Share Posted August 9, 2009 Ah. I got it working now. Thank you. Quite an excellent UDF. Great job! =] Link to comment Share on other sites More sharing options...
psynegy Posted August 30, 2009 Share Posted August 30, 2009 Found a few missing values which are quite handy for _iTunes_Current_GetInfo() _ArrayAdd($tInfo, $iTunesApp.CurrentTrack.trackid) _ArrayAdd($tInfo, $iTunesApp.CurrentTrack.location) Thanks for a great UDF! 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