Thanks to everyone for the replies, will deeply check the links as soon as i can!
@Lupp: yes adding “Option VBAsupport 1” to the macro make it run in LO too, but looking forward to further improvements i want a LO basic native code to avoid eventual not support VBA related trouble later.
Update 4rd april: it’s first time i can touch the macro since last post… (RL is killing my freetime) and found some links very useful (expecially pityonak guide is awesome!) and after a bit of reading and googleing i came up with this:
oSimpleFileAccess = com.sun.star.ucb.SimpleFileAccess
n = freefile()
Open CRESTlinkBuy For input As #n
Do While not eof(n) 'execute while not at the end of file (eof)'
input #n, buyquery
l = len(buyquery)
Numbers = "0123456789." 'tells to code what i`m seeking (#s including decimals)'
Value = ""
For i = 1 To l 'from first character till end of readed file chunk'
ActChar = mid(buyquery,i,1) 'mid function read each character'
' of the file chunk (buyquery)...'
If instr(Numbers,ActChar)<>0 Then Value = Value & ActChar '...and instr'
'function checks if Numbers contains then selected character, '
'if so adds it to Value variable'
position = seek(n) 'return position of cursor in opened file'
seek(n, position)
Next i
Loop
Close #n
Since json text uses commas to separate each data, i wrongly thought i could use the “input” function (that also stops reading at first comma) in conjunction with the “seek” function to move cursor within json and read next chunk of text ![:stuck_out_tongue: :stuck_out_tongue:](https://ask.libreoffice.org/images/emoji/twitter/stuck_out_tongue.png?v=9)
Even if this is a failure i’ve learned a lot !
I didn’t check all the links you gave me, hope to have time for that soon. Thx all again