Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Simple question $trackpath$

  1. #1
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463

    Simple question $trackpath$

    How can I take the command "TRACKPATH" and cut off the filename to just return the folder of the current song?

    FILEPATH
    DLPATH
    SONGPATH
    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?
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  2. #2
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,154
    Blog Entries
    51
    there is no way of doing it without autoit
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  3. #3
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    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?
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  4. #4
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,154
    Blog Entries
    51
    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 \])
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  5. #5
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    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.
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  6. #6
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,154
    Blog Entries
    51
    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
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  7. #7
    The Curator
    Auto Apps:loading...
    Blue ZX3's Avatar
    Join Date
    Aug 2004
    Location
    Chicago area,IL
    Posts
    5,079
    I beleve the correct AI syntax would be...

    $Path= StringLeft($StringPath, StringInStr( $StringPath,"\",-1,-1) -1)
    RideRunner...The #1 FE, PERIOD.

    Current Project: DFXVoice [v1.0 Released]
    Next in line: RRMedia v2.0

    DFX 5.1.1 Skin
    Appstore Link

    My RideRunner Plugins
    RRMedia
    RRExtended
    DFXVoice

    "There are no bugs - only undocumented features."

  8. #8
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    Quote Originally Posted by monkeyracer View Post
    So, anyone know how to return the folder the song is in rather than the full filename?
    Yes.

    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.
    Code:
    $rr = ObjCreate("RoadRunner.sdk")
    
    $ctrack = $rr.getinfo("TRACKPATH")
    $temp = StringInStr($ctrack, "\", 0, -1)
    $result = StringLeft($ctrack, $temp)
    
    $rr.execute("SETVAR;ctrackpath;" & $result)
    I have $coverfile$ defined in rr.ini as "folder.jpg" so I use that as the filename to display using the code:
    Code:
    IXX,...,"FILE;$ctrackpath$$coverfile$"
    
    
    .
    Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

  9. #9
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    Ok, I compiled that into this:

    (see attachment on next post)

    and then in rr.ini added:

    Code:
    coverfile=folder.jpg
    and exectbl.ini, added:

    Code:
    "ONSONGSTART","RUN;$skinpath$extalbumart.exe"
    and where I want the image to show up:

    Code:
    IXX,,,,,"FILE;$ctrackpath$$coverfile$"
    and that seems to work well.

    Thanks, Sal, all the credit to you for this one.
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  10. #10
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    Quote Originally Posted by monkeyracer View Post
    extalbumart.txt (Change .txt to .exe)
    heh. I named mine "albumartext.exe"
    Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

Page 1 of 2 12 LastLast

Similar Threads

  1. Fairly simple carputer/amp question
    By RyanB95 in forum Car Audio
    Replies: 25
    Last Post: 02-02-2007, 08:56 PM
  2. simple wiring question
    By yonu in forum Power Supplies
    Replies: 6
    Last Post: 01-19-2007, 04:00 PM
  3. simple lilliput ribbons question
    By avidan in forum LCD/Display
    Replies: 0
    Last Post: 01-27-2005, 08:28 PM
  4. Simple Wiring Question
    By ukchris in forum LCD/Display
    Replies: 1
    Last Post: 12-30-2004, 12:43 AM
  5. simple question - cd changer control
    By tbone in forum General Hardware Discussion
    Replies: 5
    Last Post: 09-09-2001, 07:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •