Announcement

Collapse
No announcement yet.

Set label on a skin from an .ini file

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

  • Set label on a skin from an .ini file

    I have an autoit script that downloads podcast from a list of sites that I have set in an .ini file. Is there a way to have RR read that .ini file and label the buttons for the .skin file I am making.

    [IMG][/IMG]
    My RAMPUTER

  • #3
    Do you have an example of that? I'd like to see how to include an ini file and how RR deals with it. Another option is have the autoit script do some SETVAR commands to RR.
    CarPC in my 82 Camaro. Dual core atom, M4-ATX, 7 lilliput, bu353 GPS, Reborn skin, punch 40/100ix
    MediaLaunch for RR
    Online Check for RR
    Locker for RR

    Comment


    • #4
      Here is the .ini that the script uses:
      Code:
      [Settings]
      Podcasts = 3
      Location = C:\Documents and Settings\Administrator\My Documents\Downloads\temp\
      
      
      
      
      [Sites]
      Mike & Mad Dog = http://www.wfan.com/pages/podcast/801.rss
      CNN-News = http://rss.cnn.com/services/podcasting/newscast/rss.xml
      Mike & Mike = http://sports.espn.go.com/espnradio/podcast/feeds/itunes/podCast?id=2445552
      Today Show = http://podcast.msnbc.com/audio/podcast/MSNBC-TDY-PODCAST-MP3.xml
      Site5 = http://feeds.ziffdavis.com/ziffdavis/dltvpodcast
      I like to label the buttons in the skin from the [sites] section
      Button 1 = Mike & Mad Dog
      Button 2 = CNN-News
      and so on

      Could you show example of how to do that.

      Thanks for the help
      My RAMPUTER

      Comment


      • #5
        Another option is have the autoit script do some SETVAR commands to RR.
        How is that done?
        My RAMPUTER

        Comment


        • #6
          OK, scrap the include method, I thought you were getting the AI script to create labels.

          I can think of two ways, one is the SETVAR method, for which you will need to look at how to get your script to interface with RR.

          or you can create Variables in skin.ini and change the value of them from your AI script.

          skin.ini
          Code:
           
          podlabel1=
          podlabel2=
          podlabel3=
          podlabel4=
          and then in your skin

          L,x,y,w,h,"$podlabel1$"


          etc.

          Comment


          • #7
            Originally posted by jumbodogs View Post
            How is that done?
            http://www.mp3car.com/vbulletin/rr-f...cation-rr.html
            Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

            Comment


            • #8
              Lots of ways to do this, depending on how your script looks.
              $rr = ObjCreate("RoadRunner.SDK")
              $rr.Execute("SETVAR;BUTTON1;Mike & Mad Dog")
              $rr.Execute("SETVAR;BUTTON1SITE;$mikemaddog")
              With $mikemaddog being the var you use when you pull that item from the ini.
              Then use $BUTTON1$ as a label, etc...
              CarPC in my 82 Camaro. Dual core atom, M4-ATX, 7 lilliput, bu353 GPS, Reborn skin, punch 40/100ix
              MediaLaunch for RR
              Online Check for RR
              Locker for RR

              Comment


              • #9
                if you have the same number of sites all the time i would do what enforcer and chevy are suggesting, but if the number is changing somehow, try to use a custom list with a single button to load the selected site, that way you can see all the site at once pick one, and hit load. i think is a lot easier that way.
                BASSRR ==> [Audio Player/MusicDB/Cd Player/Ripper/Rate/Internet Radio/Audio Capture/Youtube Video]
                RRTube ==> [View/Download Youtube Videos]
                WifiMan ==> [Wifi Manager]
                RRec ==> [Audio Capture]

                If You Want To Be Given Everything, Give Everything Up ...
                Bird York -- In The Deep --

                Comment


                • #10
                  Thanks for the replies. I think what chevyn8 suggested should work but I'll try to explain what my script does a little better.

                  The script downloads the set amount of podcasts from each site that is listed in the .ini file then stores the .mp3 files in sub folders based on the name that is given in the .ini file.

                  Something like this
                  C:\PodCasts\Mike&MadDog\Mike&MadDog1.mp3
                  Mike&MadDog2.mp3
                  C:\PodCasts\CNN-News\CNN-News1.mp3
                  C:\PodCasts\CNN-News\CNN-News2.mp3

                  and so on. When the script runs it gets all the podcast at the same time.

                  The reason for not just labeling the buttons manual is I thought if anyone else wants to use this they could just setup the .ini file for the script and not have to touch the .skin file. Anyways I will post the script if anyone wants to play with it. It still needs some more work .... only works on 5 of the 6 sites I want. I need to get a better understanding of StringRegExp in autoit.
                  Attached Files
                  My RAMPUTER

                  Comment


                  • #11
                    To make it more universal....change the ini to have things like:
                    site1=
                    site1url=

                    That way the script doesn't have hard coded names. Then as EL said, read up on using a custom list. Also may need to do the ini read in a loop, so the number of items in the ini can vary.
                    CarPC in my 82 Camaro. Dual core atom, M4-ATX, 7 lilliput, bu353 GPS, Reborn skin, punch 40/100ix
                    MediaLaunch for RR
                    Online Check for RR
                    Locker for RR

                    Comment


                    • #12
                      The script names the folder and the mp3 file that you download based on the ini. The reason I have it set to Mike & Mad Dog = http://www.wfan.com/pages/podcast/801.rss is so someone can just change the .ini not the script.

                      Also this should keep going for as many sites as someone puts in.
                      My RAMPUTER

                      Comment


                      • #13
                        Originally posted by chevyn8 View Post
                        To make it more universal....change the ini to have things like:
                        site1=
                        site1url=

                        That way the script doesn't have hard coded names. Then as EL said, read up on using a custom list. Also may need to do the ini read in a loop, so the number of items in the ini can vary.
                        The way jumbo set up the ini is efficient, customizeable, an no way hard coded. The script reads it into a 2-D array separating the podcast name and site.
                        Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

                        Comment


                        • #14
                          Should have looked at the code. Didn't realize inireadsection was being used...assumed you were reading the ini line by line.
                          CarPC in my 82 Camaro. Dual core atom, M4-ATX, 7 lilliput, bu353 GPS, Reborn skin, punch 40/100ix
                          MediaLaunch for RR
                          Online Check for RR
                          Locker for RR

                          Comment


                          • #15
                            2-D array style is how I roll.
                            My RAMPUTER

                            Comment

                            Working...
                            X