How to display a text-file inside the tool folder?

Hi. How would I go about adding say “display.txt” to a tool-folder and having a GUI open up that reads the textfile and displays the textfile?

I’m already somewhat familiar with opening a GUI and showing text, but this kind of dynamic showing would be much more useful.

Alright, all I needed to do was add FormulaDevice.txt to the folder, and do a

  
  
local file = nil  
file = assert(io.open("FormulaDevice.txt", "r"))  
for line in file:lines()   
do print(line)   
end  
  

Now to see if there’s some way to take this “line” and add it to a GUI…

Sure i posted this a while ago somewhere but can’t find the thread. Attached is a small tool i based my manuals on. It reads a text file into a simple dialog and allows also navigation by headers so you can have multiple text entries in a single file. It’s compact, so you should be able to adjust it to your needs.

Okay, I ripped off your Plain-text showing thing to show the FormulaDevice documentation. thanks! :)

Question… Is there a way to do this without disabling the whole of Renoise? :) These are dialog windows that take the whole focus and one cannot do anything without closing it first.
(I do like the examples, btw, they’re very useful and well documented! )

In manual.lua around line 113 change:

 renoise.app():show_custom_prompt (  
 dialog_title, dialog_content, {"OK"}  
 )  

to:

 renoise.app():show_custom_dialog (  
 dialog_title, dialog_content  
 )  

The new window will miss the OK button then, but it’s not really needed anyway.

ohh… of course… prompt to dialog. makes total sense :) thanks!