Announcement

Collapse
No announcement yet.

Simple question $trackpath$

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    there is no way of doing it without autoit
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

    Comment


    • #3
      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!

      Comment


      • #4
        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.)
        Follow Me on Twitter or Facebook
        Live mp3Car Facebook Chat

        Comment


        • #5
          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!

          Comment


          • #6
            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.)
            Follow Me on Twitter or Facebook
            Live mp3Car Facebook Chat

            Comment


            • #7
              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."

              Comment


              • #8
                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

                Comment


                • #9
                  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!

                  Comment


                  • #10
                    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

                    Comment


                    • #11
                      Originally posted by Sal R. View Post
                      heh. I named mine "albumartext.exe"
                      That's kind of funny actually...


                      Here's the correct file:

                      http://www.mp3car.com/vbulletin/1217161-post23.html

                      the first one I posted just pulls up a bunch of jibberish.
                      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!

                      Comment

                      Working...
                      X