there is no way of doing it without autoit
How can I take the command "TRACKPATH" and cut off the filename to just return the folder of the current song?
don't seem to work.
I'm trying to make something so that if the albumart is not correct, I can press a button and it will delete the incorrect art and add the path to a .txt file that I can go into later and find the right art.
I can get it to add the file to the .txt list, but since it's returning the filename as well, instead of just the folder it's located in, it won't delete the wrong art.
Also, with this we can make an indicator that shows the art in all screens without the problem we have now with it not updating correctly.
So, anyone know how to return the folder the song is in rather than the full filename?
I figured the part where it deletes the current art would probably need to be in autoit, but you're saying the file's path would need to be parsed in AI as well?
yes.. unless theres someone out there with some crazy road runner coding skills i dont think u can remove a substring from a string in RR. In autoit... you simply find the last "\" character then use a stringleft($string, [position of last \])
ok that helps, I'm still trying to understand AI and all it's wonders, but still being a n00b to it, it will take me 10 times longer than someone who knows it to get this accomplished.
i wish i was at work i'd have the snippet of exactly what ur trying to do... but i believe its
$n=stringCount("\",-1) then $path= stringLeft($stringName, $n). That gives you everything to the left of the "\". That could be wrong tho.. sometimes i get vb/flash/autoit screwy lol
I beleve the correct AI syntax would be...
$Path= StringLeft($StringPath, StringInStr( $StringPath,"\",-1,-1) -1)
This is what I use to display album art of the currently playing track in skins like audio_browser.skin. The code below will return the folder of the currently playing track.
I have $coverfile$ defined in rr.ini as "folder.jpg" so I use that as the filename to display using the code:Code:$rr = ObjCreate("RoadRunner.sdk") $ctrack = $rr.getinfo("TRACKPATH") $temp = StringInStr($ctrack, "\", 0, -1) $result = StringLeft($ctrack, $temp) $rr.execute("SETVAR;ctrackpath;" & $result)
Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2
Ok, I compiled that into this:
(see attachment on next post)
and then in rr.ini added:
and exectbl.ini, added:Code:coverfile=folder.jpg
and where I want the image to show up:Code:"ONSONGSTART","RUN;$skinpath$extalbumart.exe"
and that seems to work well.Code:IXX,,,,,"FILE;$ctrackpath$$coverfile$"
Thanks, Sal, all the credit to you for this one.