Announcement

Collapse
No announcement yet.

Define code help

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

  • Define code help

    I probably missed it in searching for "define" and "/define" and "define code"
    I'm trying to set a label with the /DEFINE code, and it works, but if I want to define more than one label in the same code, it doesn't work...

    Code:
    /DEFINE LABEL1 "TRACKTIME"
    works, but

    Code:
    /DEFINE LABEL1 "TRACKTIME||REMAININGTRACKTIME"
    or

    Code:
    /DEFINE LABEL1 "TRACKTIME|REMAININGTRACKTIME"
    or

    Code:
    /DEFINE LABEL1 "TRACKTIME++REMAININGTRACKTIME"
    or

    Code:
    /DEFINE LABEL1 "CUSTOMLABEL1"
    EXECTBL.ini -
    Code:
    "CUSTOMLABEL1","TRACKTIME||REMAININGTRACKTIME"
    or

    Code:
    /DEFINE LABEL1 "$CUSTOMLABEL1$"
    EXECTBL.ini -
    Code:
    "CUSTOMLABEL1","TRACKTIME||REMAININGTRACKTIME"
    or

    Code:
    /DEFINE LABEL1 $CUSTOMLABEL1$
    EXECTBL.ini -
    Code:
    "CUSTOMLABEL1","TRACKTIME||REMAININGTRACKTIME"
    or

    Code:
    /DEFINE LABEL1 "#CUSTOMLABEL1#"
    EXECTBL.ini -
    Code:
    "CUSTOMLABEL1","TRACKTIME||REMAININGTRACKTIME"
    or

    Code:
    /DEFINE LABEL1 #CUSTOMLABEL1#
    EXECTBL.ini -
    Code:
    "CUSTOMLABEL1","TRACKTIME||REMAININGTRACKTIME"
    none of those work.

    What do I need to do to set a string of labels in one define code? (In what I want, sometimes there is one label in that line, sometimes there are 4, which is why i'm using the define code.)
    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
    Basically I just need to know how to refer to the double pipes in a /DEFINE code...
    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


    • #3
      I think you need to start with a= sign.

      "CUSTOMLABEL1","=TRACKTIME||= - REMAININGTRACKTIME"

      Comment


      • #4
        That just displays like this:

        TRACKTIME - REMAININGTRACKTIME

        rather than the actual times... I think I might have a solution sort of. it's a little more work, but I'll post my findings later.
        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


        • #5
          Just tryed this and it shows the values.
          "TRACKTIME||REMAININGTRACKTIME"

          Comment


          • #6
            Ok, so what I ended up doing was defining each item seperately, something like this:

            in mylabels.txt
            Code:
            /DEFINE LABEL1 TRACKTIME||
            /DEFINE LABEL2 = / ||
            /DEFINE LABEL3 REMAININGTRACKTIME||
            Then on the button:
            Code:
            "WRITETOFILE;labels.txt;=/DEFINE MYLABELS #LABEL1##LABEL2##LABEL3#"
            .
            With the label as
            Code:
            L01,,,,,,,,#MYLABELS#
            So I have two seperate .txt files, one that stays the same (mylabels.txt), and one that changes based on the button press (labels.txt).
            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


            • #7
              What may I ask are you using that for or trying to do by using such a button?
              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
                well, since you ask, here's what I'm actually doing with this:

                from my exectbl.ini:
                Code:
                "MAININFO","WRITETOFILE;$skinpath$maininfo.txt;=/DEFINE MAINLABEL GPSINFO||ADDTOFILE;$skinpath$maininfo.txt;=/DEFINE ROW1 "TAGARTIST"||ADDTOFILE;$skinpath$maininfo.txt;=/DEFINE ROW2 "TAGALBUM"||ADDTOFILE;$skinpath$maininfo.txt;=/DEFINE ROW3 "TAGTITLE"||ADDTOFILE;$skinpath$maininfo.txt;=END||RELOADSKIN"
                "GPSINFO","WRITETOFILE;$skinpath$maininfo.txt;=/DEFINE MAINLABEL TRACKINFO||ADDTOFILE;$skinpath$maininfo.txt;=/DEFINE ROW1 "#ROW2A##ROW2B##ROW2C##ROW2D##ROW2E##ROW2F#"||ADDTOFILE;$skinpath$maininfo.txt;=/DEFINE ROW2 "#ROW3A##ROW3B##ROW3E##ROW3F##ROW2L#"||ADDTOFILE;$skinpath$maininfo.txt;=/DEFINE ROW3 "#ROW3C##ROW3D##ROW3G##ROW3H##ROW2L#"||ADDTOFILE;$skinpath$maininfo.txt;=END||RELOADSKIN"
                "TRACKINFO","WRITETOFILE;$skinpath$maininfo.txt;=/DEFINE MAINLABEL MAININFO||ADDTOFILE;$skinpath$maininfo.txt;=/DEFINE ROW1 "#ROW1A##ROW1B##ROW1C#"||ADDTOFILE;$skinpath$maininfo.txt;=/DEFINE ROW2 "#ROW2G##ROW2H##ROW2I##ROW2J##ROW2K#"||ADDTOFILE;$skinpath$maininfo.txt;=/DEFINE ROW3 "#ROW3I##ROW3J##ROW3K##ROW3L##ROW3M##ROW3N#"||ADDTOFILE;$skinpath$maininfo.txt;=END||RELOADSKIN"
                maininfo.txt: (after pressing the button while trackinfo is displayed)
                Code:
                /DEFINE MAINLABEL GPSINFO
                /DEFINE ROW1 "TAGARTIST"
                /DEFINE ROW2 "TAGALBUM"
                /DEFINE ROW3 "TAGTITLE"
                END
                moreinfo.txt: (doesn't change, there's no writetofile pointing to this one)
                Code:
                /DEFINE ROW2A =city - ||
                /DEFINE ROW2B CURRENTCITY||
                /DEFINE ROW2C = / zip - ||
                /DEFINE ROW2D CURRENTZIP||
                /DEFINE ROW2E = / sats - ||
                /DEFINE ROW2F GPSSAT||
                /DEFINE ROW2L =","LEFT
                /DEFINE ROW3A =lat - ||
                /DEFINE ROW3B GPSLAT||
                /DEFINE ROW3C =lon - ||
                /DEFINE ROW3D GPSLON||
                /DEFINE ROW3E = / alt - ||
                /DEFINE ROW3F GPSALT||
                /DEFINE ROW3G = / hdg - ||
                /DEFINE ROW3H GPSHDG
                /DEFINE ROW1A CURRENTTRACKTIME||
                /DEFINE ROW1B = / ||
                /DEFINE ROW1C TRACKTIME||
                /DEFINE ROW2G TAGGENRE||
                /DEFINE ROW2H = / ||
                /DEFINE ROW2I TAGYEAR||
                /DEFINE ROW2J = / ||
                /DEFINE ROW2K KBPS||
                /DEFINE ROW3I =cpu - ||
                /DEFINE ROW3J CPU||
                end
                relevant sections of main.skin:
                Code:
                RoadRunner Skin
                RRScreen mAv1c
                menu2 off.png,menu2 off.png,menu2 off.png,menu2 down.png
                
                /, INC, FILENAME
                INC,maininfo.txt
                INC,moreinfo.txt
                INC,color.txt
                
                /, L, x, y, w, h, color R;RGB, G, B, font size;FONT, font name, Code;LABELCODES, Tooltip;LABELALIGNMENT
                L02,130,381,530,30,#FRed#,#FGreen#,#FBlue#,22,"BankGothic Md BT",#ROW3#,"CENTER"
                L02,132,383,530,30,0,0,0,22,"BankGothic Md BT",#ROW3#,"CENTER"
                L03,130,352,530,30,#FRed#,#FGreen#,#FBlue#,22,"BankGothic Md BT",#ROW2#,"CENTER"
                L03,132,354,530,30,0,0,0,22,"BankGothic Md BT",#ROW2#,"CENTER"
                L04,130,322,530,30,#FRed#,#FGreen#,#FBlue#,22,"BankGothic Md BT",#ROW1#,"CENTER"
                L04,132,324,530,30,0,0,0,22,"BankGothic Md BT",#ROW1#,"CENTER"
                L005,127,323,537,89,,,,,,"EXEC;#MAINLABEL#||=",
                So, basically, I have three lines on my skin that normally display tagtitle, tagartist and tagalbum. By pressing the labels (L005,127,323,537,89,,,,,,"EXEC;#MAINLABEL#||=",) it toggles between three displays. all three can be viewed in these screen shots:

                This one shows the first set of labels:


                This one shows the second set of labels:


                And the third set, with a switchable flash speedo:


                I was trying to keep the question simple, so I didn't get lost in trying to explain the complexities of it.
                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