Hi, I made little more examination and I have finished with this code, which works well also with opening new buffers:

function openPasFromDpr2()
  local path = props['FileDir']  --without trailing /\
  local file = editor:textrange(0, editor.Length)
  for c in string.gfind(file, "\'([^\']*)\'") do
    scite.Open(path .. '\\' .. c)
  end
end

It just read complete file and do some parsing along it.

-- Roman

Well, I could not get rid of thinking, so one more improvement so it just parses the 'uses' clause:

function openPasFromDpr2()
  local path = props['FileDir']  --without trailing /\
  local file = editor:textrange(0, editor.Length)
  for uses in string.gfind(file, "uses.*;") do
    for c in string.gfind(uses, "\'([^\']*)\'") do
      scite.Open(path .. '\\' .. c)
    end
  end
end

-- Roman

_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to