Decker87 Posted November 12, 2008 Posted November 12, 2008 (edited) I am using the iTunes UDF. I need to add files to my iTunes library. However, when I use the function _iTunes_Library_AddTrack("C:\test\primus.mp3") it spits out an error message on line 114 of iTunes.au3: C:\Program Files\AutoIt3\Include\itunes.au3 (114) : ==> The requested action with this object has failed.: $Library_Playlist.AddTrack($path) $Library_Playlist.AddTrack($path)^ ERROR ->11:39:31 AutoIT3.exe ended.rc:1 So how can I add a file to my iTunes library? Edited November 12, 2008 by Decker87
AlmarM Posted November 12, 2008 Posted November 12, 2008 I think I know the problem, could I see your whole code? AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
torels Posted November 12, 2008 Posted November 12, 2008 just add _iTunes_Start() at the beginning of the code cheers 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
Decker87 Posted November 12, 2008 Author Posted November 12, 2008 (edited) I wish it were that easy. Yes, I used _iTunes_Start() in my code beforehand. However, I did manage to do what I wanted. Turns out .AddFile is the method I wanted. So, I added this to iTunes.au3: Func _iTunes_Library_AddFile($path) $Library_Playlist.AddFile($path) EndFunc Which works great. Now the question is - how can I retrieve this newly added track as an object? For instance, say I want to add the song "Changes" by "2pac" and automatically change the artist to "Tupac". I understand how to set the artist of a song that is already playing by using CurrentTrack(). Edited November 12, 2008 by Decker87
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