Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Custom List manager

  1. #11
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Bordeaux, France
    Quote Originally Posted by Sonicxtacy02 View Post
    did you modify your command so that everything shifts to compensate for the new line? you have to factor out line 1 when building your array
    It's not important because the function 'GiveLineNumberForString' return the real line !

  2. #12
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Woodbridge, VA
    Blog Entries
    I'm honestly out of suggestions here. I'm just lookin at the code snippets you've offered and trying to help. Only other thing i'd say try is remove the ;TRUE parameter from your CLLOAD.
    Last edited by Sonicxtacy02; 05-23-2013 at 01:55 PM. Senior Tech Blogger (Want a product reviewed? Contact me.)
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  3. #13
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Bordeaux, France
    I have found my issues!
    Firstly, GiveLineNumberForString doesn't return the good line , i think that is because the list is a UNICODE file ?
    Secondly, when i put my list into an array, i forgot than the first value is 0 not 1 !
    So my code can to be:
    Public Sub ModifyCustomList(ByVal CustomList As String, ByVal StringToMofify As String, ByVal CLText As String, CLDescription As String, CLImg As String)
        Dim strPath() As String
        Dim lngIndex As Long
        strPath() = Split(CLImg, "\")
        lngIndex = UBound(strPath)
        CLImg = "$SKINPATH$include\Contacts\userpics\" & strPath(lngIndex)
        Const ForReading = 1: Const ForWriting = 2
        Dim objFSO, objFile, allLines, arrLines, x, strLine, strNewContents
        'GiveLineNumberForString CustomList, StringToMofify
        ReturnedLineNumberForString = (Val(RRSDK.GetUserVar("PBCLPOS")) * 2) - 1
        'RRSDK.SetUserVar "StringToMofify", StringToMofify & " --> " & ReturnedLineNumberForString
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Set objFile = objFSO.OpenTextFile(CustomList, ForReading, True, -1)
        allLines = objFile.ReadAll
        'MsgBox allLines.Line 'number of lines
        arrLines = Split(allLines, vbCrLf)
        arrLines(ReturnedLineNumberForString - 1) = "LST" & CLText & "||" & CLDescription
        arrLines(ReturnedLineNumberForString) = "ICO" & CLImg
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Set objFile = objFSO.OpenTextFile(CustomList, ForWriting, True, -1)
        'RRSDK.SetUserVar "LN", UBound(arrLines)
        'For x = 0 To UBound(arrLines)
            'objFile.Write (arrLines(x) & vbCrLf)
        Dim MyLine
        For Each MyLine In arrLines
            objFile.Write (MyLine & vbCrLf)
    End Sub
    I replace my command 'GiveLineNumberForString CustomList, StringToMofify' by the line:
    ReturnedLineNumberForString = (Val(RRSDK.GetUserVar("PBCLPOS")) * 2) - 1
    where RRSDK.GetUserVar("PBCLPOS") is the CLPOS value.
    Last edited by pierrotm777; 05-28-2013 at 06:41 AM.

  4. #14
    The Curator
    Auto Apps:loading...
    Blue ZX3's Avatar
    Join Date
    Aug 2004
    Chicago area,IL
    For future ref, that first line in the file tells RR what line you want selected when the file/list is loaded, with the default being the first item or item 0. You can see this if you select an item farther down in the list and then do a CLSAVE cmd and then look at the first line. Item that was selected when that list was saved will be that first line +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

    "There are no bugs - only undocumented features."

  5. #15
    Maximum Bitrate
    Join Date
    Sep 2012
    Germany - Munich
    the problem of clsave is, that clsave deletes the line with the icon-path.
    so, we needed a plugin, which do this job.
    and it works :-)

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Need little help with custom list with C#
    By pierrotm777 in forum Road Runner
    Replies: 7
    Last Post: 06-28-2012, 11:04 AM
  2. Custom List with Variables
    By MGD in forum Road Runner
    Replies: 8
    Last Post: 03-17-2012, 03:40 PM
  3. Custom List question??
    By eribs4e in forum RR Skins
    Replies: 2
    Last Post: 08-11-2009, 10:12 AM
  4. Custom List creation
    By lambosprit in forum Road Runner
    Replies: 11
    Last Post: 05-12-2009, 08:46 PM
  5. Custom List (SC)
    By EL CAMINO in forum Road Runner
    Replies: 2
    Last Post: 10-29-2007, 01:41 AM


Posting Permissions

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