You can post your code snippets here for others to use and learn from


Postby djrikki » Wed Apr 15, 2015 11:38 pm

Looking back at these old functions of mine, you can combine operability into one instead streamlined function simply providing a new 'pair' parameter and inserting that into the MidStr() and UnleftStr() lines instead of the existing absolute string definitions.

Code: Select all
Global base
base = {}

;; base:GetXmlHex(data,key)
; You should call this recursively in a While ... data = ReadLine(1)...Wend  structure; ex. call line$ = GetXmlHex(data,"Track Hex")
Function base:GetXmlHex(data,key)
    Local result = 0
    If FindStr(data,"<key>") > -1
        If FindStr(data,key) > -1
            data = ReadLine(1)
            result = MidStr(data,FindStr(data,"<hex>")+StrLen("<hex>"),StrLen(data))
            result = UnleftStr(result,StrLen("</hex>"))
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
Posts: 653
Joined: Wed Apr 06, 2011 12:26 am

Return to Code snippets area

Who is online

Users browsing this forum: No registered users and 1 guest